-
Notifications
You must be signed in to change notification settings - Fork 24
67 lines (55 loc) · 1.83 KB
/
linux-test.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Linux Test
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y verilator libgmp-dev libmpfr-dev libmpc-dev
python -m pip install --upgrade pip
# BEGIN: Temp fix, see
# https://github.com/henry0312/pytest-pycodestyle/issues/97
python -m pip install py
# END: Temp fix
python -m pip install .
python -m pip install flake8 pytest pytest-cov pytest-pycodestyle fault>=3.1.1
python -m pip install importlib-resources
python -m pip install kratos # test optional dependency
- name: Test with pytest
run: |
py.test --cov magma -v --cov-report term-missing tests
pycodestyle magma/
- name: Smoke test package
run: |
pushd /tmp
python -c "import magma"
popd
- name: Test examples
run: |
cd examples
# TODO(leonardt): Merge with top-level coverage
pytest --pycodestyle tests/ . --ignore=riscv_mini
cd -
- name: Test riscv_mini
run: |
cd examples/riscv_mini
# TODO(leonardt): Merge with top-level coverage
pytest --pycodestyle tests/ riscv_mini/
cd -
- name: Upload coverage
run: |
bash <(curl -s https://codecov.io/bash)