From 5455e78615a6fbd9db8385dab0a7049ce2a28874 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 11:30:16 +0000 Subject: [PATCH 1/9] bump key actions versions for node 20 --- .github/workflows/cypress.yml | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 70432a42..4b782d3c 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -8,24 +8,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "gateway/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "gateway/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -36,12 +36,12 @@ jobs: install-command: npm install cypress --legacy-peer-deps working-directory: gateway spec: cypress/integration/retention/csv-add-affiliations.js - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-videos @@ -53,21 +53,21 @@ jobs: uses: actions/checkout@v2 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "gateway/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "gateway/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -79,12 +79,12 @@ jobs: working-directory: gateway spec: | cypress/integration/retention/csv-edit-affiliations.js - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-videos @@ -96,21 +96,21 @@ jobs: uses: actions/checkout@v2 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "gateway/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "gateway/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -122,12 +122,12 @@ jobs: working-directory: gateway spec: | cypress/integration/retention/add-affiliation.js - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-videos @@ -139,21 +139,21 @@ jobs: uses: actions/checkout@v2 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "gateway/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "gateway/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -165,12 +165,12 @@ jobs: working-directory: gateway spec: | cypress/integration/retention/notifications.js - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-videos @@ -182,21 +182,21 @@ jobs: uses: actions/checkout@v2 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "gateway/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "gateway/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -221,12 +221,12 @@ jobs: cypress/integration/retention/ui-homepage.js cypress/integration/retention/ui-homepage-edit.js cypress/integration/retention/ui-reports.js - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-screenshots path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: cypress-videos From cee98fcc2bd43428d30b1d2eceb42cd033aa52cf Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 11:35:14 +0000 Subject: [PATCH 2/9] deleting old cypress workflow --- .github/workflows/cypress.yml | 233 ---------------------------------- 1 file changed, 233 deletions(-) delete mode 100644 .github/workflows/cypress.yml diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml deleted file mode 100644 index 4b782d3c..00000000 --- a/.github/workflows/cypress.yml +++ /dev/null @@ -1,233 +0,0 @@ -name: Old UI Cypress end to end tests - -on: - workflow_dispatch: - -jobs: - csv-add-affiliations: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "gateway/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "gateway/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "gateway/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: gateway - spec: cypress/integration/retention/csv-add-affiliations.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: gateway/cypress/videos - csv-edit-affiliations: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "gateway/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "gateway/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "gateway/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: gateway - spec: | - cypress/integration/retention/csv-edit-affiliations.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: gateway/cypress/videos - add-affiliation: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "gateway/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "gateway/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "gateway/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: gateway - spec: | - cypress/integration/retention/add-affiliation.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: gateway/cypress/videos - notifications: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "gateway/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "gateway/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "gateway/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: gateway - spec: | - cypress/integration/retention/notifications.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: gateway/cypress/videos - other-tests: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "gateway/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "gateway/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "gateway/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: gateway - spec: | - cypress/integration/retention/add-member.js - cypress/integration/retention/add-user.js - cypress/integration/retention/csv-invalid-affiliation.js - cypress/integration/retention/edit-affiliation.js - cypress/integration/retention/edit-member.js - cypress/integration/retention/edit-user.js - cypress/integration/retention/reset-password.js - cypress/integration/retention/restricted-access.js - cypress/integration/retention/ui-authorities.js - cypress/integration/retention/ui-login.js - cypress/integration/retention/ui-pagination.js - cypress/integration/retention/ui-homepage.js - cypress/integration/retention/ui-homepage-edit.js - cypress/integration/retention/ui-reports.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: gateway/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: gateway/cypress/videos From 092df31e8a6e477a93fc4121815edbd89faee878 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 11:42:49 +0000 Subject: [PATCH 3/9] bump json action version for node20 --- .github/workflows/cypress new ui.yml | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index fe3523b0..a02804e3 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -11,21 +11,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -53,21 +53,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -96,21 +96,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -139,21 +139,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -182,21 +182,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.1.2 + uses: jsdaniell/create-json@1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' From e5821e83e3dbf9a3d05868ffb0b5ff2d71823dab Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 12:19:46 +0000 Subject: [PATCH 4/9] typo with action version --- .github/workflows/cypress new ui.yml | 38 +++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index a02804e3..43aebdce 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -11,21 +11,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -39,13 +39,14 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: cypress-screenshots + name: "cypress-screenshots-${{ github.job }}" path: ui/cypress/screenshots - uses: actions/upload-artifact@v4 if: failure() with: - name: cypress-videos + name: "cypress-videos-${{ github.job }}" path: ui/cypress/videos + csv-edit-affiliations: runs-on: ubuntu-latest steps: @@ -53,21 +54,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -89,6 +90,7 @@ jobs: with: name: cypress-videos path: ui/cypress/videos + add-affiliation: runs-on: ubuntu-latest steps: @@ -96,21 +98,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -132,6 +134,7 @@ jobs: with: name: cypress-videos path: ui/cypress/videos + notifications: runs-on: ubuntu-latest steps: @@ -139,21 +142,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' @@ -175,6 +178,7 @@ jobs: with: name: cypress-videos path: ui/cypress/videos + other-tests: runs-on: ubuntu-latest steps: @@ -182,21 +186,21 @@ jobs: uses: actions/checkout@v4 - name: "Create creds json" id: create-creds-json - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" - name: "Create Gmail creds json" id: create-gmail-creds-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" - name: "Create Gmail token json" id: create-gmail-token-file - uses: jsdaniell/create-json@1.2.3 + uses: jsdaniell/create-json@v1.2.3 with: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' From 107326021119709c9330e15948478b70b2f2a6a7 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 12:39:03 +0000 Subject: [PATCH 5/9] migrate to a matrix stategy to cut down on code duplication and use unique artifact names --- .github/workflows/cypress new ui.yml | 237 ++++++--------------------- 1 file changed, 49 insertions(+), 188 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index 43aebdce..a036b01d 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -4,186 +4,50 @@ on: workflow_dispatch: jobs: - csv-add-affiliations: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "ui/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "ui/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "ui/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v6 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: ui - spec: cypress/e2e/retention/csv-add-affiliations.cy.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: "cypress-screenshots-${{ github.job }}" - path: ui/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: "cypress-videos-${{ github.job }}" - path: ui/cypress/videos + test_e2e_cypress: + strategy: + matrix: + include: + - name: csv-add-affiliations + spec: + - cypress/e2e/retention/csv-add-affiliations.cy.js - csv-edit-affiliations: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "ui/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "ui/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "ui/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v6 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: ui - spec: | - cypress/e2e/retention/csv-edit-affiliations.cy.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: ui/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: ui/cypress/videos + - name: csv-edit-affiliations + spec: + - cypress/e2e/retention/csv-edit-affiliations.cy.js - add-affiliation: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "ui/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "ui/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "ui/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v6 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: ui - spec: | - cypress/e2e/retention/add-affiliation.cy.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: ui/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: ui/cypress/videos + - name: add-affiliation + spec: + - cypress/e2e/retention/add-affiliation.cy.js - notifications: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: "Create creds json" - id: create-creds-json - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials.json" - json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' - dir: "ui/cypress/fixtures" - - name: "Create Gmail creds json" - id: create-gmail-creds-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "credentials_qa.json" - json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' - dir: "ui/cypress/plugins" - - name: "Create Gmail token json" - id: create-gmail-token-file - uses: jsdaniell/create-json@v1.2.3 - with: - name: "token_qa.json" - json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' - dir: "ui/cypress/plugins" - - name: Cypress run - uses: cypress-io/github-action@v6 - with: - install-command: npm install cypress --legacy-peer-deps - working-directory: ui - spec: | - cypress/e2e/retention/notifications.cy.js - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: ui/cypress/screenshots - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-videos - path: ui/cypress/videos + - name: notifications + spec: + - cypress/e2e/retention/notifications.cy.js + + - name: other-tests: + spec: + - cypress/e2e/retention/add-member.cy.js + - cypress/e2e/retention/add-user.cy.js + - cypress/e2e/retention/csv-invalid-affiliation.cy.js + - cypress/e2e/retention/edit-affiliation.cy.js + - cypress/e2e/retention/edit-member.cy.js + - cypress/e2e/retention/edit-user.cy.js + - cypress/e2e/retention/reset-password.cy.js + - cypress/e2e/retention/restricted-access.cy.js + - cypress/e2e/retention/ui-authorities.cy.js + - cypress/e2e/retention/ui-login.cy.js + - cypress/e2e/retention/ui-pagination.cy.js + - cypress/e2e/retention/ui-homepage.cy.js + - cypress/e2e/retention/ui-homepage-edit.cy.js + - cypress/e2e/retention/ui-reports.cy.js + +################################################################################################### - other-tests: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: "Create creds json" id: create-creds-json uses: jsdaniell/create-json@v1.2.3 @@ -191,6 +55,7 @@ jobs: name: "credentials.json" json: '{"adminEmail": "${{secrets.CY_ADMIN_EMAIL}}", "adminPassword": "${{secrets.CY_ADMIN_PASSWORD}}", "password": "${{secrets.CY_PASSWORD}}", "shortPassword": "${{secrets.CY_SHORT_PASSWORD}}", "shortConfirmationPassword": "${{secrets.CY_SHORT_CONFIRMATION_PASSWORD}}", "wrongConfirmationPasssword": "${{secrets.CY_WRONG_CONFIRMATION_PASSWORD}}"}' dir: "ui/cypress/fixtures" + - name: "Create Gmail creds json" id: create-gmail-creds-file uses: jsdaniell/create-json@v1.2.3 @@ -198,6 +63,7 @@ jobs: name: "credentials_qa.json" json: '{"installed":{"client_id":"${{secrets.CY_CREDS_CLIENT_ID}}","project_id":"${{secrets.CY_CREDS_PROJECT_ID}}","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"${{secrets.CY_CREDS_CLIENT_SECRET}}","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}' dir: "ui/cypress/plugins" + - name: "Create Gmail token json" id: create-gmail-token-file uses: jsdaniell/create-json@v1.2.3 @@ -205,33 +71,28 @@ jobs: name: "token_qa.json" json: '{"access_token":"${{secrets.CY_TOKEN_ACCESS}}","refresh_token":"${{secrets.CY_TOKEN_REFRESH}}","scope":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send","token_type":"Bearer","expiry_date":${{secrets.CY_TOKEN_EXPIRY_DATE}}}' dir: "ui/cypress/plugins" + +########################################################################################################## + - name: Cypress run uses: cypress-io/github-action@v6 with: install-command: npm install cypress --legacy-peer-deps working-directory: ui spec: | - cypress/e2e/retention/add-member.cy.js - cypress/e2e/retention/add-user.cy.js - cypress/e2e/retention/csv-invalid-affiliation.cy.js - cypress/e2e/retention/edit-affiliation.cy.js - cypress/e2e/retention/edit-member.cy.js - cypress/e2e/retention/edit-user.cy.js - cypress/e2e/retention/reset-password.cy.js - cypress/e2e/retention/restricted-access.cy.js - cypress/e2e/retention/ui-authorities.cy.js - cypress/e2e/retention/ui-login.cy.js - cypress/e2e/retention/ui-pagination.cy.js - cypress/e2e/retention/ui-homepage.cy.js - cypress/e2e/retention/ui-homepage-edit.cy.js - cypress/e2e/retention/ui-reports.cy.js + ${{ matrix.spec }} + + # upload our cypress output results but only if the cypress tests failed + # NOTE: artifacts must have unique names - uses: actions/upload-artifact@v4 if: failure() with: - name: cypress-screenshots + name: "cypress-screenshots-${{ github.job }}" path: ui/cypress/screenshots + - uses: actions/upload-artifact@v4 if: failure() with: - name: cypress-videos + name: "cypress-videos-${{ github.job }}" path: ui/cypress/videos + From 7705f6f6afe8842198e2e751944cba439e93dabd Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 12:39:22 +0000 Subject: [PATCH 6/9] add a simple pre commit file to allow syntax checks of github actions --- .pre-commit-config.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..764fd284 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,37 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + name: check for added large files + description: prevents giant files from being committed. + entry: check-added-large-files + language: python + stages: [commit, push, manual] + exclude: ^tx + + - repo: local + hooks: + - id: actionlint + name: actionlint + entry: actionlint + language: golang + additional_dependencies: + [github.com/rhysd/actionlint/cmd/actionlint@v1.6.23] + types: [yaml] + files: '^.github/workflows/' + +########## +# pre-commit-ci config + +ci: + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false From 818105508c387e87e0c3c70d5f6b79bb20834f0d Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 12:57:55 +0000 Subject: [PATCH 7/9] test a multiline string input --- .github/workflows/cypress new ui.yml | 64 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index a036b01d..9f7461e2 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -9,38 +9,38 @@ jobs: matrix: include: - name: csv-add-affiliations - spec: - - cypress/e2e/retention/csv-add-affiliations.cy.js + spec: | + cypress/e2e/retention/csv-add-affiliations.cy.js - name: csv-edit-affiliations - spec: - - cypress/e2e/retention/csv-edit-affiliations.cy.js - - - name: add-affiliation - spec: - - cypress/e2e/retention/add-affiliation.cy.js - - - name: notifications - spec: - - cypress/e2e/retention/notifications.cy.js - - - name: other-tests: - spec: - - cypress/e2e/retention/add-member.cy.js - - cypress/e2e/retention/add-user.cy.js - - cypress/e2e/retention/csv-invalid-affiliation.cy.js - - cypress/e2e/retention/edit-affiliation.cy.js - - cypress/e2e/retention/edit-member.cy.js - - cypress/e2e/retention/edit-user.cy.js - - cypress/e2e/retention/reset-password.cy.js - - cypress/e2e/retention/restricted-access.cy.js - - cypress/e2e/retention/ui-authorities.cy.js - - cypress/e2e/retention/ui-login.cy.js - - cypress/e2e/retention/ui-pagination.cy.js - - cypress/e2e/retention/ui-homepage.cy.js - - cypress/e2e/retention/ui-homepage-edit.cy.js - - cypress/e2e/retention/ui-reports.cy.js - + spec: | + cypress/e2e/retention/csv-edit-affiliations.cy.js + +# - name: add-affiliation +# spec: +# - cypress/e2e/retention/add-affiliation.cy.js +# +# - name: notifications +# spec: +# - cypress/e2e/retention/notifications.cy.js +# +# - name: other-tests +# spec: +# - cypress/e2e/retention/add-member.cy.js +# - cypress/e2e/retention/add-user.cy.js +# - cypress/e2e/retention/csv-invalid-affiliation.cy.js +# - cypress/e2e/retention/edit-affiliation.cy.js +# - cypress/e2e/retention/edit-member.cy.js +# - cypress/e2e/retention/edit-user.cy.js +# - cypress/e2e/retention/reset-password.cy.js +# - cypress/e2e/retention/restricted-access.cy.js +# - cypress/e2e/retention/ui-authorities.cy.js +# - cypress/e2e/retention/ui-login.cy.js +# - cypress/e2e/retention/ui-pagination.cy.js +# - cypress/e2e/retention/ui-homepage.cy.js +# - cypress/e2e/retention/ui-homepage-edit.cy.js +# - cypress/e2e/retention/ui-reports.cy.js +# ################################################################################################### runs-on: ubuntu-latest @@ -79,8 +79,7 @@ jobs: with: install-command: npm install cypress --legacy-peer-deps working-directory: ui - spec: | - ${{ matrix.spec }} + spec: "${{ matrix.spec }}" # upload our cypress output results but only if the cypress tests failed # NOTE: artifacts must have unique names @@ -96,3 +95,4 @@ jobs: name: "cypress-videos-${{ github.job }}" path: ui/cypress/videos + From b703d269ce0a64eed3ca2ef0002189337647b138 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 13:20:22 +0000 Subject: [PATCH 8/9] test full multiline string and keep jobs running if one fails --- .github/workflows/cypress new ui.yml | 51 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index 9f7461e2..94b01404 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -16,31 +16,32 @@ jobs: spec: | cypress/e2e/retention/csv-edit-affiliations.cy.js -# - name: add-affiliation -# spec: -# - cypress/e2e/retention/add-affiliation.cy.js -# -# - name: notifications -# spec: -# - cypress/e2e/retention/notifications.cy.js -# -# - name: other-tests -# spec: -# - cypress/e2e/retention/add-member.cy.js -# - cypress/e2e/retention/add-user.cy.js -# - cypress/e2e/retention/csv-invalid-affiliation.cy.js -# - cypress/e2e/retention/edit-affiliation.cy.js -# - cypress/e2e/retention/edit-member.cy.js -# - cypress/e2e/retention/edit-user.cy.js -# - cypress/e2e/retention/reset-password.cy.js -# - cypress/e2e/retention/restricted-access.cy.js -# - cypress/e2e/retention/ui-authorities.cy.js -# - cypress/e2e/retention/ui-login.cy.js -# - cypress/e2e/retention/ui-pagination.cy.js -# - cypress/e2e/retention/ui-homepage.cy.js -# - cypress/e2e/retention/ui-homepage-edit.cy.js -# - cypress/e2e/retention/ui-reports.cy.js -# + - name: add-affiliation + spec: | + cypress/e2e/retention/add-affiliation.cy.js + + - name: notifications + spec: | + cypress/e2e/retention/notifications.cy.js + + - name: other-tests + spec: | + cypress/e2e/retention/add-member.cy.js + cypress/e2e/retention/add-user.cy.js + cypress/e2e/retention/csv-invalid-affiliation.cy.js + cypress/e2e/retention/edit-affiliation.cy.js + cypress/e2e/retention/edit-member.cy.js + cypress/e2e/retention/edit-user.cy.js + cypress/e2e/retention/reset-password.cy.js + cypress/e2e/retention/restricted-access.cy.js + cypress/e2e/retention/ui-authorities.cy.js + cypress/e2e/retention/ui-login.cy.js + cypress/e2e/retention/ui-pagination.cy.js + cypress/e2e/retention/ui-homepage.cy.js + cypress/e2e/retention/ui-homepage-edit.cy.js + cypress/e2e/retention/ui-reports.cy.js + fail-fast: false + ################################################################################################### runs-on: ubuntu-latest From 4c59019950969c1095034c3f9b932b12e2643069 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Tue, 19 Nov 2024 14:09:50 +0000 Subject: [PATCH 9/9] fix unique artifact names to use matrix identifier --- .github/workflows/cypress new ui.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress new ui.yml b/.github/workflows/cypress new ui.yml index 94b01404..2cfa81f9 100644 --- a/.github/workflows/cypress new ui.yml +++ b/.github/workflows/cypress new ui.yml @@ -40,6 +40,7 @@ jobs: cypress/e2e/retention/ui-homepage.cy.js cypress/e2e/retention/ui-homepage-edit.cy.js cypress/e2e/retention/ui-reports.cy.js + # keep running jobs even if one test fails in case there are multiple failed tests fail-fast: false ################################################################################################### @@ -87,13 +88,15 @@ jobs: - uses: actions/upload-artifact@v4 if: failure() with: - name: "cypress-screenshots-${{ github.job }}" + name: "cypress-screenshots-${{ matrix.name }}" path: ui/cypress/screenshots + if-no-files-found: ignore - uses: actions/upload-artifact@v4 if: failure() with: - name: "cypress-videos-${{ github.job }}" + name: "cypress-videos-${{ matrix.name }}" path: ui/cypress/videos + if-no-files-found: ignore