Skip to content

Commit

Permalink
Use matrix arguments for variations of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed Dec 6, 2024
1 parent 96b77bd commit 2588e62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 37 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/no-console-warnings.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ jobs:
testing:
strategy:
matrix:
frankConfig: [
"frank-manual/srcSteps/ladybugInstance/v520",
"frank-manual/srcSteps/Frank2Hermes/v560",
"frank-manual/srcSteps/NewHorizons/v510",
"frank-manual/srcSteps/exercise/v500",
"frank-manual/srcSteps/forFrankConsole/v510",
"frank-manual/src/advancedDevelopmentCredentials",
"frank-manual/src/advancedDevelopmentProperties",
"frank-manual/src/deploymentTomcat",
"frank-manual/srcSteps/Frank2Monitoring/v510"
]
include:
- frankConfig: frank-manual/srcSteps/ladybugInstance/v520
- frankConfig: frank-manual/srcSteps/Frank2Hermes/v560
- frankConfig: frank-manual/srcSteps/NewHorizons/v510
iafUtilAllowed: true
- frankConfig: frank-manual/srcSteps/exercise/v500
- frankConfig: frank-manual/srcSteps/forFrankConsole/v510
- frankConfig: frank-manual/src/advancedDevelopmentCredentials
- frankConfig: frank-manual/src/advancedDevelopmentProperties
- frankConfig: frank-manual/src/deploymentTomcat
iafUtilAllowed: true
- frankConfig: frank-manual/srcSteps/Frank2Monitoring/v510
name: ${{matrix.frankConfig}} - Test that Frank config has no warnings
runs-on: ubuntu-latest
steps:
- name: Show additional properties
run: echo "Testing ${{matrix.frankConfig}} with iafUtilAllowed = ${{ matrix.iafUtilAllowed }}"
- name: Checkout Frank!Runner
uses: actions/checkout@v4
with:
Expand All @@ -42,12 +45,6 @@ jobs:
uses: actions/checkout@v4
with:
path: frank-manual
- name: Determine what to test
id: setExpectedBehaviorTag
run: ./setExpectedBehaviorTag.sh ${{ matrix.frankConfig }}
working-directory: frank-manual/.github/workflows
- name: Show expectedBehaviorTag
run: echo "${{ steps.setExpectedBehaviorTag.outputs.expectedBehaviorTag }}"
- name: Copy cypress/cypress.config_cicd.ts to cypress/cypress.config.ts to listen to correct port
run: cp cypress.config_cicd.ts cypress.config.ts
working-directory: frank-manual/cypress
Expand Down Expand Up @@ -107,11 +104,11 @@ jobs:
run: ./waitForUrl.sh http://localhost:8090 240
working-directory: frank-manual/.github/workflows
- name: Run the tests - really no warnings
if: ${{ steps.setExpectedBehaviorTag.outputs.expectedBehaviorTag == 'NoWarnings' }}
if: ${{ matrix.iafUtilAllowed != true }}
run: yarn run cypress run --spec cypress/e2e/no-warnings.cy.ts
working-directory: frank-manual/cypress
- name: Run the tests - allow warning about IAF_Util
if: ${{ steps.setExpectedBehaviorTag.outputs.expectedBehaviorTag == 'AllowIafUtilWarning' }}
if: ${{ matrix.iafUtilAllowed == true }}
run: yarn run cypress run --spec cypress/e2e/warning-only-iaf-util.cy.ts
working-directory: frank-manual/cypress
- name: Try to access server directly with curl
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/setExpectedBehaviorTag.sh

This file was deleted.

0 comments on commit 2588e62

Please sign in to comment.