-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (37 loc) · 1.24 KB
/
test.yml
File metadata and controls
40 lines (37 loc) · 1.24 KB
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
name: Test Changes
on: [push, pull_request]
jobs:
unit:
name: Unit tests (mocked)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip requests
- name: Run unit tests
run: python -m unittest tests.test_unit
integration:
name: Live integration tests
runs-on: ubuntu-latest
needs: unit
# Live tests need real credentials and spend TestingBot credits, so only run
# them on pushes to master (fork PRs don't get secrets and shouldn't gate CI).
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install --upgrade pip requests
- name: Run integration tests
run: python -m unittest tests.test_client
env:
TB_KEY: ${{ secrets.TB_KEY }}
TB_SECRET: ${{ secrets.TB_SECRET }}