feat: dynamic unit #558
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pogues Back Office tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: ['docs/**', 'Dockerfile', 'LICENSE', 'CHANGELOG.md', 'README.md'] | |
jobs: | |
pogues-model: | |
name: Check Pogues-Model lib version exists | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Pogues-Model Version | |
id: get-version | |
run: echo "version=$(mvn help:evaluate -Dexpression='pogues-model.version' -q -DforceStdout)" >> $GITHUB_OUTPUT | |
- name: Check Pogues-Model lib tag ${{ steps.get-version.outputs.version }} existence | |
id: check-tag-exists | |
uses: mukunku/[email protected] | |
with: | |
repo: InseeFr/Pogues-Model | |
tag: ${{ steps.get-version.outputs.version }} | |
- name: Pogues-Model lib tag verification | |
id: check-tag | |
run: | | |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "false" ]]; then | |
echo "The tag v${{ steps.get-version.outputs.version }} doesn't exist in Eno lib repo." | |
exit 1 | |
fi | |
test: | |
needs: pogues-model | |
if: ${{ (github.event.pull_request.draft == false) && !contains(github.event.pull_request.labels.*.name, 'deploy-snapshot') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Get Pogues-Model Version | |
id: get-version | |
run: echo "version=$(mvn help:evaluate -Dexpression='pogues-model.version' -q -DforceStdout)" >> $GITHUB_OUTPUT | |
- name: Check Pogues-Model lib tag ${{ steps.get-version.outputs.version }} existence | |
id: check-tag-exists | |
uses: mukunku/[email protected] | |
with: | |
repo: InseeFr/Pogues-Model | |
tag: ${{ steps.get-version.outputs.version }} | |
- name: Run tests with Maven | |
run: mvn clean test --no-transfer-progress | |
# - name: Test, package and analyze with maven & SonarCloud | |
# run: mvn --no-transfer-progress verify sonar:sonar -Dsonar.projectKey=InseeFr_Pogues-Back-Office -Dsonar.organization=inseefr -Dsonar.host.url=https://sonarcloud.io | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |