-
Notifications
You must be signed in to change notification settings - Fork 13
93 lines (75 loc) · 2.54 KB
/
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
91
92
93
name: tests
# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches: [ 'main' ]
tags-ignore: [ '**' ]
# Triggers the workflow on pull request events
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
pytest:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false # false: try to complete all jobs
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Refresh package lists
run: |
sudo apt-get -o Acquire::Retries=3 update || true
- name: Install Loki dependencies
run: |
sudo apt-get -o Acquire::Retries=3 install -y graphviz gfortran
- name: Install OMNI + CLAW dependencies
run: |
sudo apt-get -o Acquire::Retries=3 install -y byacc flex openjdk-11-jdk cmake ant
- name: Install Loki
run: |
./install --with-claw --with-ofp --with-examples --with-tests --with-dace
- name: Install up-to-date CMake
run: |
source loki-activate
pip install cmake
- name: Run Loki tests
run: |
source loki-activate
pytest --cov=./loki --cov-report=xml loki
- name: Upload loki coverage report to Codecov
uses: codecov/codecov-action@v4
with:
flags: loki
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run transformations tests
run: |
source loki-activate
pytest --cov=transformations/transformations --cov-report=xml transformations/tests
- name: Upload transformations coverage report to Codecov
uses: codecov/codecov-action@v4
with:
flags: transformations
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run lint_rules tests
run: |
source loki-activate
pytest --cov=lint_rules/lint_rules --cov-report=xml lint_rules/tests
- name: Upload lint_rules coverage report to Codecov
uses: codecov/codecov-action@v4
with:
flags: lint_rules
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}