-
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.08 KB
/
build-tests.yml
File metadata and controls
80 lines (65 loc) · 2.08 KB
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
name: tests
on:
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
build-test:
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 10
matrix:
python-version: ['3.10', '3.9', '3.8', '3.7']
os: [ubuntu-latest, macos-latest]
exclude:
# mac os: exclude all but the last two python releases
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.7
# windows: exclude all but the last two python releases
# - os: windows-latest
# python-version: 3.8
# - os: windows-latest
# python-version: 3.7
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python tools
run: |
python -m pip install --upgrade pip
- name: Set up a test environment with pytest and the runtime dependencies
run: |
python -m venv vtest
export PATH=vtest/bin/:vtest/Scripts/:$PATH
pip install .
pip install -r dev-requirements.txt
pip install -r requirements.txt
- name: Run unit tests and module doctests
run: |
export PATH=vtest/bin/:vtest/Scripts/:$PATH
XDG_RUNTIME_DIR=.tests_rundir python -m pytest
- name: Run typer tests (linux)
if: matrix.os == 'ubuntu-latest'
run: |
export PATH=vtest/bin/:vtest/Scripts/:$PATH
pytype --config pytype.cfg --keep-going .
- name: Set up a environment to install into, and install the package from sources
run: |
python -m venv vinstall
export PATH=vinstall/bin/:vinstall/Scripts/:$PATH
python -m pip install .
- name: Test that the installed executable is able to run
run: |
export PATH=vinstall/bin/:vinstall/Scripts/:$PATH
scioer --help