-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (31 loc) · 980 Bytes
/
python-test.yml
File metadata and controls
37 lines (31 loc) · 980 Bytes
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
name: Run Unittests
on:
push:
branches: [ master, release ]
pull_request:
branches: [ master, release ]
jobs:
test:
name: Run Unittests
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- name: Checkout repository
uses: actions/checkout@v3
# The action checks out the branch, which triggered the event by default.
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[qopt_tests]
python -m pip install pytest-cov
- name: Run the tests
run: |
python -m pytest qopt_tests --cov=qopt --cov-report=xml
# it is important to use python -m because it adds the current directory to the path!