-
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 1.62 KB
/
tests.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
60
61
name: Run Tests
on:
push:
branches:
- '**'
pull_request:
jobs:
run-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -c "import sys; print(sys.version)"
pip install -r requirements-dev.txt
python setup.py install
- name: Run tests
env:
TMDB_APIKEY: ${{ secrets.TMDB_APIKEY }}
TMDB_SESSION: ${{ secrets.TMDB_SESSION }}
TMDB_V4_ACCESS: ${{ secrets.TMDB_V4_ACCESS }}
TMDB_V4_TOKEN: ${{ secrets.TMDB_V4_TOKEN }}
TMDB_USERNAME: ${{ secrets.TMDB_USERNAME }}
TMDB_PASSWORD: ${{ secrets.TMDB_PASSWORD }}
PAT: ${{ secrets.PAT }}
LOCAL: False
run: coverage run -m pytest -s --cov tmdbapis --cov-report xml tests/test*
- name: Codecov coverage reports
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
tag-new-versions:
runs-on: ubuntu-latest
if: ${{ success() }}
needs: [run-tests]
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
fetch-depth: 2
- uses: salsify/[email protected]
with:
version-command: |
cat VERSION