forked from ambuda-org/ambuda
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.57 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
name: 'Basic (Unit) Tests'
# **What it does**: Setups up python dependencies and runs 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.9.x'
cache: 'pip'
cache-dependency-path: requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: |
python3 -m pip install -r requirements.txt
npm install
- name: Lint
run: make lint-check
run-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.9.x'
cache: 'pip'
- name: Install dependencies
run: python3 -m pip install -r requirements.txt
- name: Run Tests
run: make coverage
- name: Check coverage
run: coverage report --fail-under=80