-
Notifications
You must be signed in to change notification settings - Fork 7
77 lines (67 loc) · 2.25 KB
/
python-app.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
68
69
70
71
72
73
74
75
76
77
name: Automated tests
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
release:
types: [published]
jobs:
# fast tests inluding linter and couple of fastests unit tests run with pytest
smoke_test:
if: >
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install -r tests/requirements-test.txt
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 --count --select=E9,F63,F7,F82 --show-source --statistics pymchelper tests examples
# - name: Smoke test with pytest
# run: |
# pytest -k "smoke" tests/
# # all tests on matrix of all possible python versions and OSes
# normal_test:
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# platform: [ubuntu-latest, macos-latest, windows-latest]
# exclude:
# - platform: macos-latest
# python-version: '3.8'
# - platform: macos-latest
# python-version: '3.10'
# - platform: macos-latest
# python-version: '3.11'
# runs-on: ${{ matrix.platform }}
# needs: [smoke_test]
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # fetch all history, as by default only last 1 commit is fetched
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
# pip install -r tests/requirements-test.txt
# - name: Test with pytest
# run: |
# pytest -k "not slow" tests/