Skip to content

Commit

Permalink
trying 6
Browse files Browse the repository at this point in the history
  • Loading branch information
wrt95 committed Jan 19, 2024
1 parent 7f4fa34 commit 9e29e4e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Playwright Tests - 2
on:
push:
branches:
- master
- [master]
paths:
- 'frontend/**'
- '.github/workflows/playwright.yml'
Expand Down
97 changes: 50 additions & 47 deletions .github/workflows/run-playwright-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,71 @@
name: Playwright Tests - 2

name: Playwright tests on pr
on:
push:
branches:
- master
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
paths:
- 'frontend/**'
- '.github/workflows/playwright.yml'
- '!frontend/stats/**'
- 'backend/**'
- '.github/workflows/run-playwright-on-pr.yaml'
- 'docker-compose.yml'
- 'Dockerfile'
- 'gitea/**'
- 'package.json'
- 'development/**'
workflow_dispatch:

jobs:
playwright-run:
name: 'Playwright Tests'
playwright-tests:
name: Build environment and run e2e test
timeout-minutes: 25
runs-on: ubuntu-latest

steps:
- name: 'Checking Out Code'
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: Generate .env file
run: |
echo PLAYWRIGHT_TEST_APP=autodeploy-v3 >> .env
echo DEVELOP_APP_DEVELOPMENT=0 >> .env
echo DEVELOP_RESOURCE_ADMIN=0 >> .env
echo DEVELOP_BACKEND=0 >> .env
echo DEVELOP_DASHBOARD=0 >> .env
echo DEVELOP_PREVIEW=0 >> .env
echo GITEA_ADMIN_PASS=g9wDIG@6gf >> .env
echo GITEA_ADMIN_USER=localg1iteaadmin >> .env
echo GITEA_CYPRESS_USER=cypress_testuser >> .env
echo GITEA_CYPRESS_PASS=g9wDIG@6gf >> .env
echo GITEA_ORG_USER=ttd >> .env
echo POSTGRES_PASSWORD=kyeDIG@eip >> .env
echo COMMIT= >> .env
echo IGNORE_DOCKER_DNS_LOOKUP=true >> .env
- name: Get yarn cache directory path
working-directory: frontend
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Build all images
run: |
docker compose build --no-cache
- uses: actions/cache@v3
id: yarn-cache
- name: Install node
uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Installing Dependencies'
working-directory: frontend/testing/playwright
run: yarn install --immutable --inline-builds
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_NM_MODE: 'hardlinks-local'
HUSKY: '0'
cache: 'yarn'

- name: Attempt to wait for deploy to environment (10 minutes sleep)
run: sleep 10m
shell: bash
- name: Run setup.js script
run: |
node ./development/setup.js
- name: Playwright run
working-directory: frontend/testing/playwright
env:
environment: local
run: |
yarn install --immutable --inline-builds
yarn
yarn playwright install --with-deps
yarn setup:playwright
yarn playwright:test:all
env:
environment: dev
autoTestUserPwd: ${{ secrets.AUTO_TEST_USER_PWD }}
accessToken: ${{ secrets.AUTO_TEST_USER_TOKEN_DEV }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Store artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-screenshots
path: frontend/testing/playwright/screenshots
- name: Stop compose file
if: always()
run: docker-compose down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type SettingsModalProps = {

/**
* @component
* Displays the settings modal
* Displays the settings modal using StudioModal
*
* @property {boolean}[isOpen] - Flag for if the modal is open
* @property {function}[onClose] - Function to be executed on close
Expand Down

0 comments on commit 9e29e4e

Please sign in to comment.