Skip to content

Commit

Permalink
Update integration.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Sep 7, 2023
1 parent 5fb284e commit 27389dd
Showing 1 changed file with 61 additions and 6 deletions.
67 changes: 61 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ concurrency:

env:
NODE_VERSION: 18
CACHE_KEY: '${{ github.ref }}-${{ github.run_id }}-${{ github.run_attempt }}'
DOMAIN: your-tenant.auth0.com
AUDIENCE: https://api.example.com/users
PORT: 3001

jobs:
integration:
name: Run Tests
build:
name: Prepare Tests
runs-on: ubuntu-latest

steps:
Expand All @@ -37,35 +38,89 @@ jobs:
with:
node: ${{ env.NODE_VERSION }}

- name: Install dependencies
- name: Install `examples/users-api` dependencies
run: |
npm ci --prefix=examples/users-api
- name: Save build artifacts
uses: actions/cache/save@v3
with:
path: .
key: ${{ env.CACHE_KEY }}

test-cra:
needs: build # Require build to complete before running tests

name: Run cra-react-router integration tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ env.CACHE_KEY }}

- name: Run CRA integration tests
run: |
npm i --prefix=examples/cra-react-router --no-package-lock --legacy-peer-deps
npm run test:cra
start-server-and-test start:api 3001 start:cra http-get://127.0.0.1:3000 cypress:run
env:
SKIP_PREFLIGHT_CHECK: true
REACT_APP_DOMAIN: your-tenant.auth0.com
REACT_APP_CLIENT_ID: yourclientid
REACT_APP_AUDIENCE: https://api.example.com/users
REACT_APP_API_PORT: 3001

test-gatsby:
needs: build # Require build to complete before running tests

name: Run Gatsby integration tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ env.CACHE_KEY }}

- name: Run Gatsby integration tests
run: |
npm i --prefix=examples/gatsby-app --no-package-lock --legacy-peer-deps
npm run test:gatsby
start-server-and-test start:api 3001 start:gatsby 3000 cypress:run
env:
GATSBY_DOMAIN: your-tenant.auth0.com
GATSBY_CLIENT_ID: yourclientid
GATSBY_AUDIENCE: https://api.example.com/users
GATSBY_API_PORT: 3001

test-nextjs:
needs: build # Require build to complete before running tests

name: Run NextJS integration tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Restore build artifacts
uses: actions/cache/restore@v3
with:
path: .
key: ${{ env.CACHE_KEY }}

- name: Run NextJS integration tests
run: |
npm i --prefix=examples/nextjs-app --no-package-lock --legacy-peer-deps
npm run test:nextjs
start-server-and-test start:api 3001 start:nextjs 3000 cypress:run
env:
NEXT_PUBLIC_DOMAIN: your-tenant.auth0.com
NEXT_PUBLIC_CLIENT_ID: yourclientid
Expand Down

0 comments on commit 27389dd

Please sign in to comment.