chore(deps-dev): update dependency npm-run-all2 to v6 #468
Workflow file for this run
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 | |
on: | |
pull_request: | |
push: | |
branches: | |
# Also run on main branch to have cache on default branch | |
- main | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
changed_files_node_all: ${{ steps.changed_files.outputs.node_all_any_changed }} | |
changed_files_node_lint: ${{ steps.changed_files.outputs.node_lint_any_changed }} | |
changed_files_renovate: ${{ steps.changed_files.outputs.renovate_any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get all test, doc and src files that have changed | |
id: changed_files | |
uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44.5.2 | |
with: | |
files_yaml: | | |
node_all: | |
- tsconfig.json | |
- package.json | |
- package-lock.json | |
- .tool-versions | |
- src/** | |
node_lint: | |
- biome.json | |
renovate: | |
- renovate.json5 | |
- name: Display changed files | |
run: | | |
echo '${{ toJson(steps.changed_files.outputs) }}' | |
node_lint: | |
runs-on: ubuntu-latest | |
needs: setup | |
if: needs.setup.outputs.changed_files_node_all == 'true' || needs.setup.outputs.changed_files_node_lint == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
cache: 'npm' | |
- run: npm ci | |
- name: Run lint | |
run: npm run lint | |
node_test: | |
runs-on: ubuntu-latest | |
needs: setup | |
if: needs.setup.outputs.changed_files_node_all == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
cache: 'npm' | |
- run: npm ci | |
- name: Run Test | |
run: npm run test:coverage | |
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
directory: ./coverage/ # optional | |
fail_ci_if_error: true # optional2 (default = false) | |
node_pack: | |
runs-on: ubuntu-latest | |
needs: setup | |
if: needs.setup.outputs.changed_files_node_all == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
cache: 'npm' | |
- run: npm ci | |
- name: Run build | |
run: npm run build | |
- name: Run pack | |
run: npm pack | |
renovate: | |
runs-on: ubuntu-latest | |
needs: setup | |
if: needs.setup.outputs.changed_files_renovate == 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
npx --package renovate -c 'renovate-config-validator' | |
required_jobs: | |
runs-on: ubuntu-latest | |
needs: | |
- node_lint | |
- node_test | |
- node_pack | |
- renovate | |
if: always() | |
steps: | |
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: | | |
echo "Some required jobs failed or cancelled." | |
exit 1 | |
- run: echo "All required jobs passed." |