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 e78d0cf commit c68521e
Showing 1 changed file with 12 additions and 74 deletions.
86 changes: 12 additions & 74 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ jobs:
with:
node: ${{ env.NODE_VERSION }}

- name: Setup common dependencies
run: |
npm ci --prefix=examples/users-api
mv examples/users-api/.env.sample examples/users-api/.env
- name: Save build artifacts
uses: actions/cache/save@v3
with:
Expand All @@ -65,34 +60,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Update /etc/hosts
run: |
sudo echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
- name: Restore build artifacts
uses: actions/cache/restore@v3
- name: Prepare integration test
uses: ./.github/actions/integration
with:
path: .
integration: 'cra-react-router'
node: ${{ env.NODE_VERSION }}
key: ${{ env.CACHE_KEY }}

- name: Restore Cypress
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/Cypress
key: ${{ env.CACHE_KEY }}-cypress

- name: Run integration tests
run: |
npm ci
npm ci --prefix=examples/users-api
npm i --prefix=examples/cra-react-router --no-package-lock --legacy-peer-deps
mv examples/cra-react-router/.env.sample examples/cra-react-router/.env
npm run test:cra
env:
SKIP_PREFLIGHT_CHECK: true
Expand All @@ -111,34 +87,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Update /etc/hosts
run: |
sudo echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
- name: Restore build artifacts
uses: actions/cache/restore@v3
- name: Prepare integration test
uses: ./.github/actions/integration
with:
path: .
integration: 'gatsby-app'
node: ${{ env.NODE_VERSION }}
key: ${{ env.CACHE_KEY }}

- name: Restore Cypress
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/Cypress
key: ${{ env.CACHE_KEY }}-cypress

- name: Run integration tests
run: |
npm ci
npm ci --prefix=examples/users-api
npm i --prefix=examples/gatsby-app --no-package-lock --legacy-peer-deps
mv examples/gatsby-app/.env.development.sample examples/gatsby-app/.env
npm run test:gatsby
env:
GATSBY_DOMAIN: your-tenant.auth0.com
Expand All @@ -156,34 +113,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Update /etc/hosts
run: |
sudo echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
- name: Restore build artifacts
uses: actions/cache/restore@v3
- name: Prepare integration test
uses: ./.github/actions/integration
with:
path: .
integration: 'nextjs-app'
node: ${{ env.NODE_VERSION }}
key: ${{ env.CACHE_KEY }}

- name: Restore Cypress
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/Cypress
key: ${{ env.CACHE_KEY }}-cypress

- name: Run integration tests
run: |
npm ci
npm ci --prefix=examples/users-api
npm i --prefix=examples/nextjs-app --no-package-lock --legacy-peer-deps
mv examples/nextjs-app/.env.sample examples/nextjs-app/.env
npm run test:nextjs
env:
NEXT_PUBLIC_DOMAIN: your-tenant.auth0.com
Expand Down

0 comments on commit c68521e

Please sign in to comment.