@@ -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 :
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