Check junits #49
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: Check junits | |
on: | |
workflow_dispatch: | |
inputs: | |
short_tests: | |
type: boolean | |
required: false | |
default: true | |
medium_tests: | |
type: boolean | |
required: false | |
default: true | |
long_tests: | |
type: boolean | |
required: false | |
default: true | |
mvn_opts: | |
type: string | |
required: false | |
default: "" | |
ref: | |
description: "The branch, tag or SHA to test. Otherwise, uses the default branch." | |
type: string | |
required: false | |
default: "" | |
jobs: | |
get_profiles: | |
name: Test JUnit | |
runs-on: ubuntu-22.04 | |
outputs: | |
profiles: ${{ steps.getter.outputs.profiles }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '10' | |
- name: Building string profiles to run | |
id: getter | |
run: | | |
echo "## Run JUNIT tests" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo " - input ref : __\"${{ inputs.ref }}\"__" >> $GITHUB_STEP_SUMMARY | |
if [ -n "${{ inputs.mvn_opts }}" ]; then | |
echo " - input mvn_opts : __\"${{ inputs.mvn_opts }}\"__" >> $GITHUB_STEP_SUMMARY | |
fi | |
if [ -f "./.github/workflows/scripts/get_profiles.sh" ]; then | |
chmod +x ./.github/workflows/scripts/get_profiles.sh | |
profiles="$(./.github/workflows/scripts/get_profiles.sh ${{ inputs.short_tests }} ${{ inputs.medium_tests }} ${{ inputs.long_tests }})" | |
echo "profiles=${profiles}" >> $GITHUB_OUTPUT | |
echo " - profiles : __\"${profiles}\"__" >> $GITHUB_STEP_SUMMARY | |
fi | |
test: | |
needs: [ get_profiles ] | |
uses: ./.github/workflows/test-analysis.yml | |
with: | |
test_profile: ${{ needs.get_profiles.outputs.profiles }} | |
report_context: development | |
mvn_opts: ${{ inputs.mvn_opts }} | |
ref: ${{ inputs.ref }} | |
secrets: inherit |