-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (45 loc) · 1.4 KB
/
testing.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
# SPDX-FileCopyrightText: 2021 Louisa Marie Kienesberger <[email protected]>
# SPDX-FileCopyrightText: 2022 Lukas Schrangl <[email protected]>
#
# SPDX-License-Identifier: BSD-3-Clause
name: sdt-python test suite
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macOS, windows]
steps:
- uses: actions/checkout@v2
- name: Install system packages
uses: amitie10g/install-package@v1
with:
apt: libegl1 libopengl0
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
use-mamba: true
miniforge-version: latest
miniforge-variant: Mambaforge
environment-file: tests/conda-env.yml
- name: Conda info
shell: pwsh
run: conda info
- name: Lint with flake8
shell: pwsh
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --statistics
- name: Test with pytest
shell: pwsh
run: |
$os = "${{ runner.os }}"
if ( $os -eq "Linux") {
pytest -v --ignore=tests/test_gui/ tests/
} else {
pytest -v tests/
}