-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
944 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,60 @@ | ||
name: Playwright Tests | ||
on: [deployment_status] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
if: github.event.deployment_status.state == 'success' | ||
# TODO fix docs/issues/376 | ||
|
||
# name: Playwright Tests | ||
# on: [deployment_status] | ||
# jobs: | ||
# test: | ||
# timeout-minutes: 60 | ||
# runs-on: ubuntu-latest | ||
# if: github.event.deployment_status.state == 'success' | ||
|
||
strategy: | ||
matrix: | ||
shard: ["1/3", "2/3", "3/3"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: nvm | ||
name: Read .nvmrc | ||
run: echo "::set-output name=NVMRC;$(cat .nvmrc)" | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '${{ steps.nvm.outputs.NVMRC }}' | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Cache yarn cache | ||
uses: actions/[email protected] | ||
id: cache-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn- | ||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | ||
${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules- | ||
- run: yarn | ||
if: | | ||
steps.cache-yarn-cache.outputs.cache-hit != 'true' || | ||
steps.cache-node-modules.outputs.cache-hit != 'true' | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
env: | ||
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }} | ||
run: yarn playwright test --shard=${{ matrix.shard }} | ||
- name: Build Storybook, serve and run tests | ||
run: yarn storybook:test-ci | ||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
# strategy: | ||
# matrix: | ||
# shard: ["1/3", "2/3", "3/3"] | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - id: nvm | ||
# name: Read .nvmrc | ||
# run: echo "::set-output name=NVMRC;$(cat .nvmrc)" | ||
# - uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: '${{ steps.nvm.outputs.NVMRC }}' | ||
# - name: Get yarn cache directory path | ||
# id: yarn-cache-dir-path | ||
# run: echo "::set-output name=dir::$(yarn cache dir)" | ||
# - name: Cache yarn cache | ||
# uses: actions/[email protected] | ||
# id: cache-yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
# with: | ||
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
# key: ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
# ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-yarn- | ||
# - name: Cache node_modules | ||
# id: cache-node-modules | ||
# uses: actions/cache@v2 | ||
# with: | ||
# path: node_modules | ||
# key: ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | ||
# ${{ runner.os }}-${{ steps.nvm.ouputs.NVMRC }}-nodemodules- | ||
# - run: yarn | ||
# if: | | ||
# steps.cache-yarn-cache.outputs.cache-hit != 'true' || | ||
# steps.cache-node-modules.outputs.cache-hit != 'true' | ||
# - name: Install Playwright Browsers | ||
# run: npx playwright install --with-deps | ||
# - name: Run Playwright tests | ||
# env: | ||
# PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }} | ||
# run: yarn playwright test | ||
# - name: Build Storybook, serve and run tests | ||
# run: yarn storybook:test-ci | ||
# - uses: actions/upload-artifact@v2 | ||
# if: always() | ||
# with: | ||
# name: playwright-report | ||
# path: playwright-report/ | ||
# retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
cf40cc4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./
docs.goteleport.com
docs-goteleport.vercel.app
docs-kohl-delta.vercel.app
docs-git-main-goteleport.vercel.app