forked from vzhou842/profanity-check
-
-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (39 loc) · 1.2 KB
/
checks.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
name: Checks
on:
pull_request:
branches:
- master
jobs:
black:
runs-on: ubuntu-latest
strategy:
matrix:
# For quotes on 3.10: https://github.com/actions/setup-python/issues/160
python_version: [3.8, 3.9, '3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- run: |
python -m pip install --upgrade pip
pip install -r development_requirements.txt
- run: black --check --verbose .
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
# For quotes on 3.10: https://github.com/actions/setup-python/issues/160
python_version: [3.8, 3.9, '3.10', 3.11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- run: |
python -m pip install --upgrade pip
pip install -r development_requirements.txt
#
# Reference: https://thiagolopessilva.medium.com/running-unit-testing-on-github-action-using-pytest-61653d993c9c
#
- run: python -m pytest --import-mode=append tests/