Update actions/upload-artifact v2 -> v4 #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the default branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# The maximum number of minutes to let a job run before GitHub automatically cancels it | |
timeout-minutes: 5 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '11' | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint source code | |
run: npm run lint -- --max-warnings 0 | |
- name: Generate library bundle | |
run: npm run build | |
- name: Save bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bundle.js | |
path: dist/bundle.js | |
- name: Run test HTTP server and test suites | |
run: npm test | |
- name: Save test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: results.json | |
path: results.json | |
- name: Fail job if any test suits failed | |
run: python test/process.py results.json |