-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.52 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: Tests
run-name: Tests ${{ github.ref_name }}
on:
push:
pull_request:
branches: [main]
types: [opened, edited, reopen, synchronize, ready_for_review]
workflow_dispatch:
jobs:
lint:
name: Linters/Type Checkers
strategy:
fail-fast: false
matrix:
python: [3.8, 3.12]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
run: pip install -e '.[linting]'
- name: Run flake8
run: python3 -m flake8 .
- name: Run mypy
run: python3 -m mypy
test:
name: Unit Tests
strategy:
fail-fast: false
matrix:
python: [3.8, 3.12]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
pip install -e '.[testing]'
sudo apt update
sudo apt install ffmpeg
- name: Run pytest (with coverage)
run: python3 -m coverage run -m pytest -s -v test/
env:
AWS_S3_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }}
AWS_S3_SECRET_KEY: ${{ secrets.AWS_S3_SECRET_KEY }}
- name: Display coverage report
run: python3 -m coverage report --omit=config*