E2E test #91
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
name: E2E test | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 1-5' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
e2e: | |
name: E2E test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: web | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: 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 }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: install | |
run: yarn install | |
- name: install playwright dependencies | |
run: yarn run playwright install | |
- name: E2E test | |
run: yarn run e2e | |
env: | |
REEARTH_WEB_API: https://api.test.reearth.dev/api | |
REEARTH_WEB_AUTH0_AUDIENCE: ${{ secrets.REEARTH_WEB_AUTH0_AUDIENCE }} | |
REEARTH_WEB_AUTH0_CLIENT_ID: ${{ secrets.REEARTH_WEB_AUTH0_CLIENT_ID }} | |
REEARTH_WEB_AUTH0_DOMAIN: ${{ secrets.REEARTH_WEB_AUTH0_DOMAIN }} | |
REEARTH_WEB_E2E_BASEURL: https://test.reearth.dev | |
REEARTH_WEB_E2E_USER_ID: ${{ secrets.REEARTH_WEB_E2E_USER_ID }} | |
REEARTH_WEB_E2E_TEAM_ID: ${{ secrets.REEARTH_WEB_E2E_TEAM_ID }} | |
REEARTH_WEB_E2E_USERNAME: ${{ secrets.REEARTH_WEB_E2E_USERNAME }} | |
REEARTH_WEB_E2E_PASSWORD: ${{ secrets.REEARTH_WEB_E2E_PASSWORD }} | |
REEARTH_WEB_E2E_USER_NAME: ${{ secrets.REEARTH_WEB_E2E_USER_NAME }} | |
REEARTH_WEB_E2E_SIGNUP_SECRET: ${{ secrets.REEARTH_WEB_E2E_SIGNUP_SECRET }} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright | |
path: | | |
playwright-report/ | |
test-results/ | |
if-no-files-found: ignore | |
retention-days: 7 | |
slack-notification: | |
if: success() || failure() | |
name: Slack Notification | |
needs: | |
- e2e | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification | |
uses: Gamesight/slack-workflow-status@master | |
if: always() | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |