-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (54 loc) · 1.64 KB
/
insolver-tests.yaml
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
name: Insolver testing
on:
push:
branches: [master, dev]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
isDev:
- ${{ contains(github.ref, 'dev') }}
exclude:
- isDev: true
os: windows-latest
- isDev: true
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip setuptools wheel
pip install wheel ruff pytest pytest-cov black[jupyter]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with black
shell: bash
run: |
black . --check --line-length 120
- name: Lint with ruff
shell: bash
run: |
ruff . --select=E9,F63,F7,F82 --show-source
ruff . --exit-zero --statistics
- name: Test with pytest
shell: bash
run: |
python -m pytest --cov=./ --cov-report=xml
- name: Code coverage with codecov on (ubuntu-latest & Python 3.10 & master)
if: |
(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.ref == 'refs/heads/master')
uses: codecov/codecov-action@v3
with:
flags: unittests
name: codecov-insolver
fail_ci_if_error: false
files: ./coverage.xml