-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (56 loc) · 1.53 KB
/
website-tests.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: website-tests
on:
# test
pull_request:
paths:
- "website/**"
- ".github/workflows/website-tests.yml"
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ci-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}-website-tests
cancel-in-progress: true
jobs:
checks:
name: Check format and types
runs-on: codebuild-loculus-ci-${{ github.run_id }}-${{ github.run_attempt }}
timeout-minutes: 15
defaults:
run:
working-directory: ./website
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ./website/.nvmrc
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json') }}
- run: npm ci
- run: npm run check-format
- run: npm run check-types
if: always()
unitTests:
name: Unit Tests
runs-on: codebuild-loculus-ci-${{ github.run_id }}-${{ github.run_attempt }}
timeout-minutes: 15
defaults:
run:
working-directory: ./website
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ./website/.nvmrc
- name: Cache .npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('website/**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test