-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (52 loc) · 1.34 KB
/
main.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
name: Pre-Commit and Cross-Platform Test Suite
on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
schedule:
# Run every Friday at 23:59 UTC
- cron: '59 23 * * 5'
workflow_dispatch:
jobs:
pre-commit:
name: Pre-Commit Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.8'
architecture: 'x64'
- name: Pre-Commit
run: |
python -m pip install pre-commit
pre-commit run -a
- name: Analysis (git diff)
if: failure()
run: git diff
tests:
name: Test-${{ matrix.os }}-Py${{ matrix.python-version }}
needs: pre-commit
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [ '3.8', '3.9']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python-${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Setup Package
run: python -m pip install .[dev,test]
- name: Unit Tests
run: py.test -v