-
-
Notifications
You must be signed in to change notification settings - Fork 603
42 lines (37 loc) · 1.21 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Unit Tests / Lint
# On every push, for every pull-request and whenever another workflow calls this one
on: [push, pull_request, workflow_call]
permissions:
contents: read
env:
NODE_VERSION: '20'
# Ensure only a single unit test workflow runs at any one time for any event and
# ref. This allows multiple unit tests/linters to run, but at most one per ref.
# NOTE: Changed `ref` to `sha`, since even for PRs, `ref` will be `develop`.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.sha }}
cancel-in-progress: true
jobs:
check:
name: Unit Tests / Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Always fetch the branch that triggered the event (develop or master)
ref: ${{ github.ref }}
- name: Setup NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Install packages
run: yarn install --immutable
- name: Run ESLint
run: yarn lint
- name: Run unit tests
run: yarn test
- name: Test CSL update
run: yarn update:csl
- name: Test Citation update
run: yarn update:citation