-
Notifications
You must be signed in to change notification settings - Fork 15
67 lines (61 loc) · 1.72 KB
/
test-pr.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
name: Test Pull Request
on:
pull_request:
branches:
- main
# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}
jobs:
check:
name: Run checks for GutenTAG on ubuntu with python 3.7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
use-mamba: true
auto-update-conda: true
python-version: "3.7"
- name: Install dependencies
run: |
pip install -r requirements.dev
- name: Typcheck with mypy
run: |
python setup.py typecheck
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics
test:
name: Test GutenTAG on ${{ matrix.os }} with python ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macOS-latest]
python_version: ["3.7", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
use-mamba: true
auto-update-conda: true
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
pip install -r requirements.dev
- name: Test with pytest
run: |
python setup.py test
- name: Upload Coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
flags: unittests