Frank configs should not produce warnings #306
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: Frank configs should not produce warnings | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
testing: | |
strategy: | |
matrix: | |
include: | |
- name: ladybugInstance-v520 | |
frankConfig: frank-manual/srcSteps/ladybugInstance/v520 | |
- name: Frank2Hermes-v560 | |
frankConfig: frank-manual/srcSteps/Frank2Hermes/v560 | |
- name: NewHorizons-v510 | |
frankConfig: frank-manual/srcSteps/NewHorizons/v510 | |
iafUtilAllowed: true | |
- name: exercise-v500 | |
frankConfig: frank-manual/srcSteps/exercise/v500 | |
- name: forFrankConsole-v510 | |
frankConfig: frank-manual/srcSteps/forFrankConsole/v510 | |
- name: advancedDevelopmentCredentials | |
frankConfig: frank-manual/src/advancedDevelopmentCredentials | |
- name: advancedDevelopmentProperties | |
frankConfig: frank-manual/src/advancedDevelopmentProperties | |
- name: deploymentTomcat | |
frankConfig: frank-manual/src/deploymentTomcat | |
iafUtilAllowed: true | |
- name: Frank2Monitoring-v510 | |
frankConfig: frank-manual/srcSteps/Frank2Monitoring/v510 | |
- name: Frank2DockerDevel-v530 | |
frankConfig: frank-manual/srcSteps/Frank2DockerDevel/v530 | |
iafUtilAllowed: true | |
withDocker: true | |
- name: Frank2Authentication-v515 client | |
frankConfig: frank-manual/srcSteps/Frank2Authentication/v515 | |
iafUtilAllowed: true | |
withDocker: true | |
- name: Frank2Authentication-v515 server | |
frankConfig: frank-manual/srcSteps/Frank2Authentication/v515 | |
iafUtilAllowed: true | |
withDocker: true | |
port: 8091 | |
# To make these work, we need access to our private Nexus docker repository | |
# - name: Frank2Transactions with queue | |
# frankConfig: frank-manual/srcSteps/Frank2Transactions/v515 | |
# iafUtilAllowed: true | |
# withDocker: true | |
# waitTime: 600 | |
# - name: Frank2Transactions with table ibisstore | |
# frankConfig: frank-manual/srcSteps/Frank2Transactions/v525 | |
# iafUtilAllowed: true | |
# withDocker: true | |
# waitTime: 600 | |
name: ${{matrix.name}} - 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 }} and withDocker = ${{ matrix.withDocker }}" | |
- name: Checkout Frank!Runner | |
if: ${{ matrix.withDocker != true }} | |
uses: actions/checkout@v4 | |
with: | |
repository: wearefrank/frank-runner | |
path: frank-runner | |
- name: See commit number of checked-out frank-runner | |
if: ${{ matrix.withDocker != true }} | |
run: git log -1 | |
working-directory: frank-runner | |
- name: Set port where Frank!Framework is served | |
if: ${{ matrix.withDocker != true }} | |
run: echo "tomcat.connector.port=8090" > frank-runner/build.properties | |
- name: Set debug to true | |
if: ${{ matrix.withDocker != true }} | |
run: echo "debug=true" >> frank-runner/build.properties | |
- name: Set projects.dir | |
if: ${{ matrix.withDocker != true }} | |
run: echo "projects.dir=.." >> frank-runner/build.properties | |
- name: Select the configuration in the manual we want to test | |
if: ${{ matrix.withDocker != true }} | |
run: echo "project.dir=${{matrix.frankConfig}}" >> frank-runner/build.properties | |
- name: Checkout frank-manual | |
uses: actions/checkout@v4 | |
with: | |
path: frank-manual | |
- name: Change the port queried by the test to the default - 8090 | |
if: ${{ ! matrix.port }} | |
run: ./adjustServerPort.sh ../../cypress/cypress.config.ts 8090 | |
working-directory: frank-manual/.github/workflows | |
- name: Change the port queried by the test to ${{ matrix.port }} | |
if: ${{ matrix.port }} | |
run: ./adjustServerPort.sh ../../cypress/cypress.config.ts ${{ matrix.port }} | |
working-directory: frank-manual/.github/workflows | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.x | |
cache: "yarn" | |
cache-dependency-path: "**/yarn.lock" | |
- name: Show node version | |
run: node -v | |
working-directory: "frank-manual/cypress" | |
- name: Show yarn version | |
run: yarn -v | |
working-directory: "frank-manual/cypress" | |
- name: Install packages | |
run: yarn install --immutable | |
working-directory: frank-manual/cypress | |
- name: Cache Frank!Runner dependencies - build | |
if: ${{ matrix.withDocker != true }} | |
uses: actions/cache@v3 | |
with: | |
path: frank-runner/build | |
key: ${{ runner.os }}${{ matrix.frankConfig }}-frank-runner-build | |
restore-keys: | | |
${{ runner.os }}${{ matrix.frankConfig }}-frank-runner-build | |
- name: Cache Frank!Runner dependencies - download | |
if: ${{ matrix.withDocker != true }} | |
uses: actions/cache@v3 | |
with: | |
path: frank-runner/download | |
key: ${{ runner.os }}${{ matrix.frankConfig }}-frank-runner-download | |
restore-keys: | | |
${{ runner.os }}${{ matrix.frankConfig }}-frank-runner-download | |
- name: Show current time, allows you to check that logs are not old | |
run: date | |
- name: Let Frank!Runner do its downloads | |
if: ${{ matrix.withDocker != true }} | |
run: ./env.sh > installFrankRunnerEnv.log | |
working-directory: frank-runner | |
- name: Show apache-tomcat directories | |
if: ${{ matrix.withDocker != true }} | |
run: find . -path './build/*' -name 'apache-tomcat*' | |
working-directory: frank-runner | |
- name: Remove old Tomcat directories | |
if: ${{ matrix.withDocker != true }} | |
run: rm -rf ./build/apache-tomcat-9* | |
working-directory: frank-runner | |
- name: Check that there is only one version of Tomcat | |
if: ${{ matrix.withDocker != true }} | |
run: test $(find . -path './build/*' -name 'apache-tomcat*' | wc -w) -eq 1 | |
working-directory: frank-runner | |
- name: Delete old Ladybug test reports | |
if: ${{ matrix.withDocker != true }} | |
run: find . -path './build/apache-tomcat*/logs/testtool*' -delete | |
working-directory: frank-runner | |
- name: Remove old catalina.out | |
if: ${{ matrix.withDocker != true }} | |
run: find . -path './build/apache-tomcat*/catalina.out' -delete | |
working-directory: frank-runner | |
- name: Start server using Frank!Runner in background | |
if: ${{ matrix.withDocker != true }} | |
run: ./restart.sh > serverStartLog.log & | |
working-directory: frank-runner | |
- name: Start server using docker-compose | |
if: ${{ matrix.withDocker == true }} | |
run: docker compose up & | |
working-directory: ${{ matrix.frankConfig }} | |
- name: Wait for server to be available - default port 8090 - default time 240 | |
if: ${{ ! matrix.port && ! matrix.waitTime }} | |
run: ./waitForUrl.sh http://localhost:8090 240 | |
working-directory: frank-manual/.github/workflows | |
- name: Wait for server to be available - port ${{ matrix.port }} - default time 240 | |
if: ${{ matrix.port && ! matrix.waitTime }} | |
run: ./waitForUrl.sh http://localhost:${{ matrix.port }} 240 | |
working-directory: frank-manual/.github/workflows | |
- name: Wait for server to be available - default port 8090 - time ${{ matrix.waitTime }} | |
if: ${{ ! matrix.port && matrix.waitTime }} | |
run: ./waitForUrl.sh http://localhost:8090 ${{ matrix.waitTime }} | |
working-directory: frank-manual/.github/workflows | |
- name: Wait for server to be available - port ${{ matrix.port }} - time ${{ matrix.waitTime }} | |
if: ${{ matrix.port && matrix.waitTime }} | |
run: ./waitForUrl.sh http://localhost:${{ matrix.port }} ${{ matrix.waitTime }} | |
working-directory: frank-manual/.github/workflows | |
- name: Run the tests - really no warnings | |
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: ${{ 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 - default port 8090 | |
if: ${{ ! matrix.port }} | |
run: curl -v -i -X DELETE http://localhost:8090/iaf/ladybug/api/report/all/Test | |
- name: Try to access server directly with curl - port ${{ matrix.port }} | |
if: ${{ matrix.port }} | |
run: curl -v -i -X DELETE http://localhost:${{ matrix.port }}/iaf/ladybug/api/report/all/Test | |
- name: Show files | |
run: tree -L 5 . | |
if: always() | |
- name: Store cypress.config.ts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: cypress.config.ts ${{ matrix.name }} | |
path: frank-manual/cypress/cypress.config.ts |