-
Notifications
You must be signed in to change notification settings - Fork 213
59 lines (52 loc) · 1.36 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
51
52
53
54
55
56
57
58
59
name: Python Test
on:
push:
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"
pull_request:
branches: [ master, development ]
paths-ignore:
- "**.md"
- ".markdown_style.rb"
- ".mdlrc"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9]
ext: [.sh]
include:
- os: windows-latest
python-version: 3.9
ext: .ps1
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip Flake8-pyproject pytest pytest-cov
pip install .
- name: Make configuration for tests
env:
REDDIT_TOKEN: ${{ secrets.REDDIT_TEST_TOKEN }}
run: |
./devscripts/configure${{ matrix.ext }}
- name: Lint with flake8
run: |
flake8 . --select=E9,F63,F7,F82
- name: Test with pytest
run: |
pytest -m 'not slow' --verbose --cov=./bdfr/ --cov-report term:skip-covered --cov-report html
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: htmlcov/