Skip to content

Commit c4fbd22

Browse files
LAUGT VictorLAUGT Victor
authored andcommitted
implement a github workflow to test the pip installation from the online PyPi repo
1 parent be110fc commit c4fbd22

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pip install from PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
test-pip-installation:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
15+
fail-fast: false
16+
17+
steps:
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: Display Python version
24+
run: python -c "import sys; print(sys.version)"
25+
26+
- name: Install package from PyPI
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install inclusionmap
30+
31+
- name: Run program
32+
run: |
33+
inclusionmap . -l python

.github/workflows/pip-install.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,20 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
2324
- name: Set up Python ${{ matrix.python-version }}
2425
uses: actions/setup-python@v3
2526
with:
2627
python-version: ${{ matrix.python-version }}
28+
2729
- name: Display Python version
2830
run: python -c "import sys; print(sys.version)"
31+
2932
- name: Install package using pip
3033
run: |
3134
python -m pip install --upgrade pip
3235
pip install .
36+
3337
- name: Run program
3438
run: |
3539
inclusionmap . -l python

.github/workflows/python-app.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,32 @@ jobs:
2323

2424
steps:
2525
- uses: actions/checkout@v4
26+
2627
- name: Set up Python ${{ matrix.python-version }}
2728
uses: actions/setup-python@v3
2829
with:
2930
python-version: ${{ matrix.python-version }}
31+
3032
- name: Display Python version
3133
run: python -c "import sys; print(sys.version)"
34+
3235
- name: Install dependencies
3336
run: |
3437
python -m pip install --upgrade pip
3538
pip install flake8 pytest
3639
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
3741
- name: Run program
3842
run: |
3943
PYTHONPATH+=. python inc_map . -l python
44+
4045
- name: Lint with flake8
4146
run: |
4247
# stop the build if there are Python syntax errors or undefined names
4348
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4449
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4550
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
51+
4652
- name: Test with pytest
4753
run: |
4854
pytest || [[ $? -eq 5 ]]

0 commit comments

Comments
 (0)