diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b328eef..6c11623 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -1,4 +1,4 @@ -name: Compilation and UTests +name: Compilation and Tests on: workflow_call: @@ -7,13 +7,21 @@ on: description: 'Name of the tool to compile' required: true type: string + systest: + description: 'Whether to run pysys-tests after compilation' + default: false + type: boolean jobs: build-debug-utest: + id: build-utest permissions: checks: write pull-requests: write runs-on: ubuntu-latest + concurrency: + group: compile-testing-${{ github.ref }} + cancel-in-progress: true steps: - name: Checkout Code uses: actions/checkout@v4 @@ -31,3 +39,22 @@ jobs: files: | build/**/waf-utest.xml check_name: "Waf Unit Tests" + + system-test: + needs: build-utest + if: inputs.systest == true + permissions: + checks: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Run system tests + id: pysys + uses: apes-suite/pysys-action@v1.0.0 + + - name: Upload archive artifacts for any test failures + uses: actions/upload-artifact@v4 + if: always() && steps.pysys.outputs.artifact_TestOutputArchiveDir + with: + name: pysys_output + path: ${{ steps.pysys.outputs.artifact_TestOutputArchiveDir }} diff --git a/README.md b/README.md index d501674..22898d8 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,16 @@ Reusable Github workflows for the APES repositories * **compile.yml**: compile `build debug` with the build-action for an APES tool. Takes a `name` input parameter to label the build step accordingly. + The `systest` input parameter is a boolean that indicates whether pysys tests + should be run after a successful compilation. + For example the caller may want to run the system tests only for pull requests + that are no longer in draft mode and could pass + `${{ github.event.pull_request.draft == false }}`. The waf unit tests are being run and their report is published accordingly. This should only be run in pull request. Needs the permission to write `checks` and `pull-requests`. + If `systest` is `true`, the workflow proceeds to run the + system tests with pysys. * **ford.yml**: create FORD documentation with waf and deploy it to the github pages of the repository. Takes a `name` indicating the tool for which the