-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (33 loc) · 1014 Bytes
/
unittest.yaml
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
name: Unit tests
on:
push:
branches:
- "main"
pull_request:
jobs:
unittest:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
py_ver: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py_ver }}
- name: "Create virtualenv"
run: python -m venv venv/
- name: "Activate virtualenv"
run: venv/Scripts/Activate.ps1
if: ${{ matrix.os == 'windows-latest' }}
- name: "Activate virtualenv"
run: source venv/bin/activate
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' }}
- name: "Upgrade pip"
run: python -m pip install --upgrade pip
- name: "Install package"
run: python -m pip install -e .
- name: "Run unit tests"
run: python -m unittest discover -s tests/