-
Notifications
You must be signed in to change notification settings - Fork 13
37 lines (34 loc) · 966 Bytes
/
python-tests.yml
File metadata and controls
37 lines (34 loc) · 966 Bytes
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
name: Run tests
on:
pull_request:
branches:
- "**"
push:
branches:
- master
jobs:
build-linux:
runs-on: ubuntu-24.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: Lint with flake8
run: |
micromamba install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 emu tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 emu tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run Python tests with pytest
run: |
micromamba install pytest
pytest