diff --git a/.github/workflows/check_nexus_version.yml b/.github/workflows/check_nexus_version.yml new file mode 100644 index 000000000..52f0deee9 --- /dev/null +++ b/.github/workflows/check_nexus_version.yml @@ -0,0 +1,30 @@ +name: nexus version check + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: 'true' + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Generate nexus git version + run: | + cd pynxtools/definitions + git describe --dirty --tags --long --match "*[0-9]*" > ../nexus-ref.txt + cd ../ + - uses: GuillaumeFalourd/diff-action@v1 + with: + first_file_path: pynxtools/nexus-version.txt + second_file_path: pynxtools/nexus-ref.txt + expected_result: PASSED \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3e47f6ad5..6d47622be 100644 --- a/.gitignore +++ b/.gitignore @@ -202,6 +202,7 @@ cython_debug/ !requirements.txt !dev-requirements.txt !mkdocs-requirements.txt +!pynxtools/nexus-version.txt build/ nexusparser.egg-info/PKG-INFO .python-version diff --git a/pynxtools/nexus-version.txt b/pynxtools/nexus-version.txt new file mode 100644 index 000000000..d97b7c1de --- /dev/null +++ b/pynxtools/nexus-version.txt @@ -0,0 +1 @@ +v2022.07-927-gd2fdad4fc \ No newline at end of file