-
Notifications
You must be signed in to change notification settings - Fork 28
55 lines (43 loc) · 1.4 KB
/
main.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
# This is a basic workflow to help you get started with Actions
name: CI for PRs
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the devel branch
on:
pull_request:
branches: [ devel ]
jobs:
lint:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
check-latest: true
# npm 9 causes an issue while using node 18 preventing pr image build to finish
- name: Force npm downgrade to v8
run: npm i -g npm@8
- name: Install modules
run: npm ci
- name: Check the code with linter
run: npm run lint
jest-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2 # For codecov action it has to be != 1
- uses: actions/setup-node@v3
with:
node-version: '18'
check-latest: true
# npm 9 causes an issue while using node 18 preventing pr image build to finish
- name: Force npm downgrade to v8
run: npm i -g npm@8
- name: Install modules
run: npm ci
- name: Run tests
run: npm run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1