Skip to content

Commit

Permalink
Merge pull request #371 from rest-for-physics/submodule-validation
Browse files Browse the repository at this point in the history
Adding submodule validation inside framework
  • Loading branch information
juanangp authored Feb 14, 2023
2 parents fe59044 + 38a1b55 commit 3e8e1f6
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Checkout submodule"
description: "Checkout specific repository and branch otherwise, it checkout master"
inputs:
branch:
description: "Branch to checkout"
required: true
repository:
description: "Repository"
required: true
path:
description: "Path"
required: true

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
path: ${{ inputs.path }}
- name: Checkout repository branch
id: repositoryBranch
run: |
cd ${{ inputs.path }}
var=$(git ls-remote --heads origin ${{ inputs.branch }})
if [[ -z $var ]]; then
echo "Branch "${{ inputs.branch }}" not found in " ${{ inputs.repository }}
echo "exist=false" >> $GITHUB_OUTPUT
else
echo "Branch "${{ inputs.branch }}" found in " ${{ inputs.repository }}
git fetch
git checkout ${{ inputs.branch }}
git pull
fi
shell: bash
24 changes: 24 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -634,3 +634,27 @@ jobs:
name: AlphaTrack
path: ${{ env.REST_PATH }}/examples/restG4/08.Alphas/data/Run_5MeV_1um.root
retention-days: 1

rawlib-validation:
uses: rest-for-physics/rawlib/.github/workflows/validation.yml@submodule-validation

geant4lib-validation:
uses: rest-for-physics/geant4lib/.github/workflows/validation.yml@submodule-validation

detectorlib-validation:
uses: rest-for-physics/detectorlib/.github/workflows/validation.yml@submodule-validation

connectorslib-validation:
uses: rest-for-physics/connectorslib/.github/workflows/validation.yml@submodule-validation

tracklib-validation:
uses: rest-for-physics/tracklib/.github/workflows/validation.yml@submodule-validation

legacylib-validation:
uses: rest-for-physics/legacylib/.github/workflows/validation.yml@submodule-validation

axionlib-validation:
uses: rest-for-physics/axionlib/.github/workflows/validation.yml@submodule-validation

wimplib-validation:
uses: rest-for-physics/wimplib/.github/workflows/validation.yml@submodule-validation

0 comments on commit 3e8e1f6

Please sign in to comment.