Skip to content

Commit

Permalink
allow multiple branches in plugin test CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Jul 16, 2024
1 parent c341561 commit 0d95e3d
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/plugin_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0d95e3d

Please sign in to comment.