diff --git a/.github/workflows/plugin_test.yaml b/.github/workflows/plugin_test.yaml index a30967303..35fb2111d 100644 --- a/.github/workflows/plugin_test.yaml +++ b/.github/workflows/plugin_test.yaml @@ -22,19 +22,25 @@ jobs: include: - plugin: pynxtools-ellips - branch: main + branches: + - main tests_to_run: tests/. - plugin: pynxtools-raman - branch: main + branches: + - main tests_to_run: tests/. - plugin: pynxtools-mpes - branch: main + branches: + - main tests_to_run: tests/. - plugin: pynxtools-stm - branch: main + branches: + - main tests_to_run: tests/. - plugin: pynxtools-xps - branch: main + branches: + - update-configs-after-mpes-changes + - main tests_to_run: tests/. # - plugin: pynxtools-apm # branch: main @@ -61,13 +67,30 @@ jobs: - name: Install package run: | uv pip install ".[dev]" + - name: Check if branch exists + id: check-branch + run: | + branch_exists=false + for branch in ${{ matrix.branches }}; do + if git ls-remote --heads https://github.com/FAIRmat-NFDI/${{ matrix.plugin }}.git $branch | grep $branch; then + echo "Branch $branch exists." + echo "::set-output name=branch::$branch" + branch_exists=true + break + fi + done + if [ "$branch_exists" = "false" ]; then + echo "No branches exist." + exit 1 + fi - name: Clone ${{ matrix.plugin }} repo + if: success() uses: actions/checkout@v4 with: fetch-depth: 0 repository: FAIRmat-NFDI/${{ matrix.plugin }} path: ${{ matrix.plugin }} - ref: ${{ matrix.branch }} + ref: ${{ steps.check-branch.outputs.branch }} - name: Install nomad run: | uv pip install nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git