-
-
Notifications
You must be signed in to change notification settings - Fork 23
90 lines (72 loc) · 2.04 KB
/
basic-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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Install python and node. Run lint and unit tests.
name: 'Basic (Unit) Tests'
# **Why we have it**: Automatically run tests to ensure code doesn't introduce regressions.
# **Who does it impact**: Python small-scale "unit" tests.
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
cache: 'pip'
cache-dependency-path: requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: |
make install-python
npm ci
- name: Lint
run: |
source env/bin/activate
make lint-check
- name: Build docs
run: |
source env/bin/activate
make docs
run-py-tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
cache: 'pip'
- name: Install dependencies
run: python3 -m pip install -r requirements.txt
- name: Run Tests
run: make coverage
- name: Check coverage
run: make coverage-report
run-js-tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install Node dependencies
run: npm ci
- name: Run tests and check coverage
run: make js-coverage