Skip to content

Commit 789631a

Browse files
committed
Adds GH actions configuration file
1 parent 1c2d9bd commit 789631a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Installation, test and coverage
2+
on: [push]
3+
4+
jobs:
5+
test:
6+
# Multiple platforms have been disabled because Windows and OSx needs more credits than what we have.
7+
# Don't use them during class or the assignment
8+
name: py${{ matrix.python-version }} # ${{ matrix.platform }}
9+
runs-on: ubuntu-latest # ${{ matrix.platform }}
10+
strategy:
11+
matrix:
12+
# platform: [ubuntu-latest, windows-latest, macos-latest]
13+
python-version: [3.9, 3.11]
14+
15+
steps:
16+
# Checkout the repository and setups the machine to use python
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install testing dependencies
24+
run: |
25+
pip install pytest pytest-cov
26+
27+
- name: Install package
28+
run: |
29+
pip install .
30+
31+
- name: Run tests
32+
run: pytest --cov=./

0 commit comments

Comments
 (0)