-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (49 loc) · 1.57 KB
/
run-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
57
58
59
name: Run tests
on:
push:
pull_request:
jobs:
run_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install node.js v16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
working-directory: /home/runner/work/Moorhen/
run: |
sudo apt-get update -y
sudo apt-get install -y npm
- name: Restore cache node16 modules
id: cache-node16-modules-load
uses: actions/cache@v4
with:
path: /home/runner/work/Moorhen/Moorhen/baby-gru/node_modules
key: node16-modules-cache
- name: Install npm modules
working-directory: /home/runner/work/Moorhen/Moorhen/baby-gru
if: steps.cache-node16-modules-load.outputs.cache-hit != 'true'
run: npm install
- name: Save node modules cache
id: cache-node16-modules-save
if: steps.cache-node16-modules-load.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: /home/runner/work/Moorhen/Moorhen/baby-gru/node_modules
key: node16-modules-cache
- name: Test typescript transpilation
working-directory: /home/runner/work/Moorhen/Moorhen/baby-gru
run: |
npm run create-version
npm run transpile-protobuf
npx graphql-codegen
npx tsc
- name: Run react tests
working-directory: /home/runner/work/Moorhen/Moorhen/baby-gru
run: npm run test-react