-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (39 loc) · 1.22 KB
/
test.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
name: scramp
permissions: read-all
on: [push]
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
# Add safe directory to work around bug in GitHub actions/checkout
git config --global --add safe.directory ${GITHUB_WORKSPACE}
python -m pip install --upgrade pip
pip install pytest pytest-mock .
- name: Run pytest tests
run: |
python -m pytest -x -v -W error test --ignore=test/test_readme.py
checks:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build flake8 Flake8-pyproject flake8-alphabetize pytest black \
passlib twine .
- name: Run checks
run: |
black --check .
flake8 .
python -m pytest -x -v -W error test/test_readme.py