-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (34 loc) · 1.36 KB
/
pip-installation.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
name: Python installation
on: [push]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
#TODO: use github action to read python version from pyproject.toml
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python # Set Python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Create virtual env under each python version
# (optional and a bit redundant because we are already on a specific python)
# it insures installation instruction provided in README are working
- name: Install dependencies
run: |
python -m venv working-env --clear
source working-env/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
# - name: Test with pytest
# run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
# - name: Upload pytest test results
# uses: actions/upload-artifact@v4
# with:
# name: pytest-results-${{ matrix.python-version }}
# path: junit/test-results-${{ matrix.python-version }}.xml
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}