build(deps): bump tj-actions/changed-files from 21 to 41 in /.github/workflows #71
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 Pull | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
formatting: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Prettier Check | |
uses: creyD/prettier_action@v4.2 | |
id: prettier-run | |
with: | |
prettier_options: --check ./src/**/*.{js,ts,md,json} --config ./.prettierrc | |
dry: true | |
build: | |
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} | |
needs: [formatting] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node_version: [14, 16, 18] | |
include: | |
- os: macos-latest | |
node_version: 16 | |
- os: windows-latest | |
node_version: 16 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**/*.ts | |
**/*.js | |
- name: Use Node ${{ matrix.node }} | |
if: steps.changed-files.outputs.any_changed == 'true' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'yarn' | |
- name: Install deps and build (with cache) | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: yarn | |
- name: Lint | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: yarn lint | |
- name: Test | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: yarn test --ci --maxWorkers=2 | |
- name: Build | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: yarn build |