-
Notifications
You must be signed in to change notification settings - Fork 26
86 lines (72 loc) · 2 KB
/
tests_unit.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
name: unit
on:
push:
# Runs for pull requests
pull_request:
branches:
- master
# Runs on publish
release:
types:
[published]
# Allow manual triggers
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
# Cancel previous jobs if a new version was pushed
concurrency:
group: "${{ github.ref }}-${{ matrix.arch }}"
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: dependencies
run: |
pip install -U pip
pip install poetry
poetry env use python3.10
source $(poetry env info -p)/bin/activate
#
# poetry doesnot work when installing those !?
#
pip install antlr4-python3-runtime==4.9.3
pip install -e .
pip install -e benchmate
#
#
#
poetry install --with dev
- name: Simple Template
run: |
source $(poetry env info -p)/bin/activate
milabench new --name simplebench --template simple
cd benchmarks/simplebench
make tests
cd ..
rm -rf simplebench
- name: Voir Template
run: |
source $(poetry env info -p)/bin/activate
milabench new --name voirbench --template voir
cd benchmarks/voirbench
make tests
cd ..
rm -rf voirbench
- name: tests
run: |
source $(poetry env info -p)/bin/activate
coverage run --source=milabench -m pytest --ignore=tests/integration tests/
coverage report -m
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
env_vars: PLATFORM,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}