From 1fa63d2260a3ba8bd4da9f06605e436ceb71e552 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 8 Mar 2022 18:06:54 +0000 Subject: [PATCH] Remove Cypress action --- .github/workflows/cypress.yml | 33 ++++++--------------------------- apps/explorer-e2e/cypress.json | 1 + 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index e9529aa07..dcc4ba545 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -18,36 +18,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Derive appropriate SHAs for base and head for `nx affected` commands + uses: nrwl/nx-set-shas@v2 - name: Use Node.js 16 id: Node - uses: actions/setup-node@v2-beta + uses: actions/setup-node@v2 with: node-version: 16 - name: Install root dependencies run: yarn install - - name: Start server - run: | - yarn nx serve explorer & - - - name: Cypress run - uses: cypress-io/github-action@v2 - with: - install: false - wait-on: 'http://localhost:4200' - working-directory: apps/explorer-e2e - wait-on-timeout: 120 - record: true - env: - # pass the Dashboard record key as an environment variable - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - # Recommended: pass the GitHub token lets this action correctly - # determine the unique run id necessary to re-run the checks - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # pass the project ID from the secrets through environment variable - CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }} - - - uses: actions/upload-artifact@v2 - if: ${{ always() }} - with: - name: coverage - path: apps/explorer-e2e/coverage + - name: Build app and run tests + - run: npx nx affected:e2e --target=build --parallel=3 + - run: npx nx affected:e2e --target=test --parallel=2 --record --key ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/apps/explorer-e2e/cypress.json b/apps/explorer-e2e/cypress.json index 428c55e3d..bad6108fe 100644 --- a/apps/explorer-e2e/cypress.json +++ b/apps/explorer-e2e/cypress.json @@ -1,5 +1,6 @@ { "baseUrl": "http://localhost:4200", + "projectId": "et4snf", "fileServerFolder": ".", "fixturesFolder": false, "pluginsFile": "./src/plugins/index.js",