-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (60 loc) · 1.58 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
60
61
62
63
64
65
66
67
68
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Unit Testing
jobs:
chore:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [py37, py38, py39, py310, py311, flake8]
include:
- toxenv: py37
python-version: "3.7"
- toxenv: py38
python-version: "3.8"
- toxenv: flake8
python-version: "3.8"
- toxenv: py39
python-version: "3.9"
- toxenv: py310
python-version: "3.10"
- toxenv: py311
python-version: "3.11"
steps:
- uses: actions/checkout@v2
with:
# Fetch the latest commit, only
fetch-depth: 1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install virtualenv
run: |
pip install virtualenv
virtualenv --python=python3 .venv
- name: Print environment
run: |
source .venv/bin/activate
python --version
pip --version
- name: Install dependencies
run: |
source .venv/bin/activate
pip install tox
pip install -r requirements.txt
pip install -r dev-requirements.txt
- name: Tox
run: |
source .venv/bin/activate
tox -e ${{ matrix.toxenv }}
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
if: matrix.toxenv == 'py38'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}