Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

Commit 4739dba

Browse files
committed
Fixed workflow
1 parent bf62cbb commit 4739dba

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
- name: Build version module
2323
run: |
2424
echo "__version__ = '${{ steps.version.outputs.describe }}'" > src/adif_file/__version__.py
25+
echo "__version_str__ = '${{ steps.version.outputs.describe }}'" >> src/adif_file/__version__.py
2526
echo "__branch__ = ''" >> src/adif_file/__version__.py
26-
echo "__unclean__ = False" >> src/adif_file/__version__.py
27+
echo "__unclean__ = False"
2728
- name: Set up Python ${{ matrix.python-version }}
2829
uses: actions/setup-python@v5
2930
with:
@@ -36,12 +37,12 @@ jobs:
3637
- name: Lint with flake8
3738
run: |
3839
# stop the build if there are Python syntax errors or undefined names
39-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
40+
flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics
4041
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
41-
flake8 . --count --exit-zero --max-complexity=13 --max-line-length=120 --statistics
42+
flake8 ./src --count --exit-zero --max-complexity=15 --max-line-length=120 --statistics
4243
- name: Test with pytest
4344
run: |
44-
pytest
45+
PYTHONPATH=./src pytest
4546
- name: Build package
4647
run: |
4748
python -m build

.github/workflows/python-test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23-
- name: Fake the version file
23+
- name: Get git version
24+
id: version
25+
uses: proudust/gh-describe@v2
26+
- name: Build version module
2427
run: |
25-
echo "__version__ = '0.1'" > src/adif_file/__version__.py
26-
echo "__branch__ = ''" >> src/adif_file/__version__.py
27-
echo "__unclean__ = False" >> src/adif_file/__version__.py
28+
echo "__version__ = '${{ steps.version.outputs.describe }}'" > src/adif_file/__version__.py
29+
echo "__version_str__ = '${{ steps.version.outputs.describe }}'" >> src/adif_file/__version__.py
30+
echo "__branch__ = ''" >> src/adif_file/__version__.py
31+
echo "__unclean__ = False" >> src/adif_file/__version__.py
2832
- name: Set up Python ${{ matrix.python-version }}
2933
uses: actions/setup-python@v5
3034
with:
@@ -37,9 +41,9 @@ jobs:
3741
- name: Lint with flake8
3842
run: |
3943
# stop the build if there are Python syntax errors or undefined names
40-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
44+
flake8 ./src --count --select=E9,F63,F7,F82 --show-source --statistics
4145
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
42-
flake8 . --count --exit-zero --max-complexity=13 --max-line-length=120 --statistics
46+
flake8 ./src --count --exit-zero --max-complexity=15 --max-line-length=120 --statistics
4347
- name: Test with pytest
4448
run: |
4549
pytest

0 commit comments

Comments
 (0)