Skip to content

Commit

Permalink
ci: include post-deploy e2e checks in the deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yld-weng committed Jan 20, 2022
1 parent a1a2e5a commit 40ccb6a
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion .github/workflows/deploy.yml
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ master ]
schedule:
- cron: '0 5 * * *'
- cron: '0 5 * * 1,3,5'
workflow_dispatch:
inputs:
Name:
Expand Down Expand Up @@ -79,4 +79,46 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GATSBY_ENV: ${{ secrets.GATSBY_ENV }}

e2e-test:
needs: deploy
continue-on-error: true
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- uses: actions/checkout@v2

- name: NPM Cache
id: npm-cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-cache-

- name: Install playwright dependencies
uses: microsoft/playwright-github-action@v1

- name: Install dependencies
run: npm ci

- name: Jest cache
id: gatsby-jest-cache
uses: actions/cache@v2
with:
path: .jest-cache
key: ${{ runner.os }}-jestCache-${{ github.run_id }}
restore-keys: ${{ runner.os }}-jestCache-

- name: tests
run: npm run test:e2e:post-deploy






0 comments on commit 40ccb6a

Please sign in to comment.