https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-concurrency-and-the-default-behavior
35 lines
869 B
YAML
35 lines
869 B
YAML
name: "Lint (web)"
|
|
|
|
on:
|
|
# Run on every pull request (open or push to it) that changes web/
|
|
pull_request:
|
|
paths:
|
|
- "web/**"
|
|
- ".github/workflows/web-lint.yml"
|
|
|
|
# Cancel in-progress lint runs when a new commit is pushed.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup node and enable yarn caching
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "yarn"
|
|
cache-dependency-path: "web/yarn.lock"
|
|
|
|
- run: yarn install
|
|
|
|
- run: yarn lint
|