Skip to content

Update Dependencies #767

Update Dependencies

Update Dependencies #767

Workflow file for this run

name: CI
on: pull_request
env:
FORCE_COLOR: 3
permissions:
contents: read
jobs:
lint:
name: Lint
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: Brightspace/third-party-actions@actions/checkout
- name: Set up node
uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint (ESLint)
run: npm run lint:eslint
- name: Lint (EditorConfig)
run: npm run lint:editorconfig
licenses:
name: Check Licenses
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: Brightspace/third-party-actions@actions/checkout
- name: Set up node
uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Check licenses
run: npm run license-check
build:
name: Build
timeout-minutes: 5
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: Brightspace/third-party-actions@actions/checkout
- name: Set up node
uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Handle changes
uses: Brightspace/third-party-actions@peter-evans/create-pull-request
id: changes
with:
commit-message: Update Build
base: ${{github.event.pull_request.head.ref}}
branch: ghworkflow/update-build-for-pr-${{github.event.number}}
title: Update Build for PR ${{github.event.number}}
body: 'Update build for PR #${{github.event.number}}.'
delete-branch: true
draft: true
add-paths: dist/*
- name: Leave comment
if: steps.changes.outputs.pull-request-operation == 'created'
uses: BrightspaceUI/actions/comment-on-pr@main
with:
message: >
New build required - pull request
#${{steps.changes.outputs.pull-request-number}} has been opened with
new built files.
post-mode: hide-previous
- name: Report status
if: >
steps.changes.outputs.pull-request-operation == 'created' ||
steps.changes.outputs.pull-request-operation == 'updated'
uses: Brightspace/third-party-actions@actions/github-script
with:
script: core.setFailed('Build changes detected')
test:
name: Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: Brightspace/third-party-actions@actions/checkout
- name: Set up node
uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:unit
- name: Upload report (debug, dry run)
uses: ./
if: github.actor != 'dependabot[bot]'
with:
aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID}}
aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY}}
aws-session-token: ${{secrets.AWS_SESSION_TOKEN}}
dry-run: true
debug: true
- name: Upload report
uses: ./
if: github.actor != 'dependabot[bot]'
with:
aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID}}
aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY}}
aws-session-token: ${{secrets.AWS_SESSION_TOKEN}}