From 7b2e9c6ae3b1760a355c55872e4f9c3178275996 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Thu, 9 Nov 2023 14:30:45 +0100 Subject: [PATCH] Split --- .github/workflows/e2e-test.yml | 65 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 44 ++--------------------- 2 files changed, 67 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/e2e-test.yml diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml new file mode 100644 index 00000000..c29be303 --- /dev/null +++ b/.github/workflows/e2e-test.yml @@ -0,0 +1,65 @@ +name: E2E Test + +on: + merge_group: + workflow_dispatch: + pull_request: + branches: + - main + push: + branches: + - main + - chore/github-actions + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +env: + NODE_VERSION: 18 + CACHE_KEY: '${{ github.ref }}-${{ github.run_id }}-${{ github.run_attempt }}' + +jobs: + sample-01: + name: E2E Test Sample + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts + + - name: E2E Test Sample + uses: ./.github/actions/test + with: + working-directory: Sample-01 + domain: ${{ secrets.AUTH0_TEST_DOMAIN }} + client-id: ${{ secrets.AUTH0_TEST_CLIENT_ID }} + api-identifier: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }} + + standalone: + name: E2E Test Standalone + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts + + - name: E2E Test Standalone + uses: ./.github/actions/test + with: + working-directory: Standalone + domain: ${{ secrets.AUTH0_TEST_DOMAIN }} + client-id: ${{ secrets.AUTH0_TEST_CLIENT_ID }} + api-identifier: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }} + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e3ffb6da..e94d384e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Build +name: Build and Test on: merge_group: @@ -54,44 +54,4 @@ jobs: - name: Build Standalone uses: ./.github/actions/build with: - working-directory: Standalone - e2e-sample-01: - name: E2E Test Sample - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - - - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts - - - name: E2E Test Sample - uses: ./.github/actions/test - with: - working-directory: Sample-01 - domain: ${{ secrets.AUTH0_TEST_DOMAIN }} - client-id: ${{ secrets.AUTH0_TEST_CLIENT_ID }} - api-identifier: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }} - - e2e-standalone: - name: E2E Test Standalone - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - - - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts - - - name: E2E Test Standalone - uses: ./.github/actions/test - with: - working-directory: Standalone - domain: ${{ secrets.AUTH0_TEST_DOMAIN }} - client-id: ${{ secrets.AUTH0_TEST_CLIENT_ID }} - api-identifier: ${{ secrets.AUTH0_TEST_API_IDENTIFIER }} - + working-directory: Standalone \ No newline at end of file