-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (92 loc) · 2.46 KB
/
run-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
94
name: simplesat
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
run-tests:
strategy:
matrix:
runtime: [3.8, '3.11', pypy3.8]
os: [ubuntu-latest, macos-12, macos-latest, windows-latest]
include:
- os: ubuntu-20.04
runtime: 3.6
runs-on: ${{ matrix.os }}
needs: code-lint
steps:
- name: Clone the source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runtime }}
- name: Install dev dependencies
run: python -m pip install -r dev_requirements.txt
- name: Install sat-solver
run: python -m pip install -e .
- name: Run tests
run: coverage run -p -m haas simplesat
- name: Upload Coverage info
uses: actions/upload-artifact@v4
with:
name: coverage-${{matrix.os}}-${{matrix.runtime}}
path: coverage.*
build-docs:
runs-on: ubuntu-latest
needs: run-tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install necessary apt-get packages
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install doc dependencies
run: python -m pip install -r doc_requirements.txt
- name: Install sat-solver
run: python -m pip install .
- name: Build docs
run: cd docs && make html
coverage:
runs-on: ubuntu-latest
needs: run-tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- name: Install coverage
run: pip install coverage
- name: Generate coverage report
run: |
pip install -e .
coverage combine
coverage report
coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/*
code-lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.6
uses: actions/setup-python@v5
with:
python-version: 3.6
- name: Install flake8
run: python -m pip install flake8
- name: Lint codebase
run: python -m flake8 simplesat/