-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: murashkin.i <[email protected]>
- Loading branch information
Showing
24 changed files
with
566 additions
and
1,789 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: 🎭 Playwright install | ||
description: 'Installs the playwright with deps' | ||
inputs: | ||
playwright-cache-folder: | ||
description: 'Set playwright cache folder' | ||
required: false | ||
default: '~/.cache/ms-playwright' | ||
cache-prefix: | ||
description: 'Used to invalidate cache in case of issue' | ||
required: false | ||
default: '2023.03' | ||
browsers: | ||
description: 'Set browsers to install (ie: "chromium webkit")' | ||
required: false | ||
default: 'chromium webkit' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 📜 Expose playwright config | ||
id: playwright-config | ||
shell: bash | ||
run: | | ||
echo "CURRENT_VERSION=$(npm info @playwright/test version)" >> $GITHUB_OUTPUT | ||
echo "CACHE_KEY=$(npm info @playwright/test version)" >> $GITHUB_OUTPUT | ||
- name: 🤖 Compute cache config | ||
id: playwright-cache-config | ||
shell: bash | ||
run: | | ||
echo "CACHE_KEY=${{ runner.os }}-playwright-cache-${{ inputs.cache-prefix }}-${{ steps.playwright-config.outputs.CURRENT_VERSION }}" >> $GITHUB_OUTPUT | ||
- name: 📥 Restore playwright install | ||
uses: actions/cache@v3 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
${{ inputs.playwright-cache-folder }} | ||
key: ${{ steps.playwright-cache-config.outputs.CACHE_KEY }} | ||
|
||
- name: 🚀 Playwright debug | ||
shell: bash | ||
run: | | ||
echo "OS: ${{ matrix.os }}" | ||
echo "Playwright version: ${{ steps.playwright-version.outputs.version }}" | ||
echo "Playwright cache folder: ${{ inputs.playwright-cache-folder }}" | ||
echo "Browsers: ${{ inputs.browsers }}" | ||
echo "Cache key: ${{ steps.playwright-cache-config.outputs.CACHE_KEY }}" | ||
echo "Cache hit: ${{ steps.playwright-cache.outputs.cache-hit == 'true' }}" | ||
- name: 📦 Install playwright browsers | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: npx playwright install chromium webkit |
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,5 +1,5 @@ | ||
--- | ||
name: 'Monorepo install (pnpm)' | ||
name: Monorepo install (pnpm) | ||
description: 'Run pnpm install' | ||
|
||
runs: | ||
|
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
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 |
---|---|---|
|
@@ -40,3 +40,5 @@ jobs: | |
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
|
||
... |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
name: E2E CI for web app | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/web/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
# Only consider those paths to trigger the action | ||
paths: | ||
- 'apps/web/**' | ||
- 'packages/**' | ||
- 'package.json' | ||
- 'pnpm*' | ||
- '.github/**' | ||
|
||
env: | ||
NEXT_DISABLE_SENTRY: false | ||
SENTRY_LOG_LEVEL: debug | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
SENTRY_URL: ${{ secrets.SENTRY_URL }} | ||
NEXT_SENTRY_UPLOAD_DRY_RUN: true | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXTAUTH_URL: 'http://localhost:3000' | ||
|
||
jobs: | ||
e2e: | ||
timeout-minutes: 10 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- 'ubuntu-22.04' | ||
node: | ||
- '18' | ||
include: | ||
- os: 'ubuntu-22.04' | ||
playwright_binary_path: ~/.cache/ms-playwright | ||
|
||
steps: | ||
- name: 📦 Check out the codebase | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ⚙️ Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: 📥 Monorepo install | ||
uses: ./.github/actions/pnpm-install | ||
|
||
# see https://github.com/vercel/next.js/pull/27362 | ||
- name: ♻️ Restore "web" app build from cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/apps/web/.next/cache | ||
${{ github.workspace }}/.cache | ||
${{ github.workspace }}/**/tsconfig.tsbuildinfo | ||
key: ${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-${{ hashFiles('apps/web/src/**.[jt]sx?', 'apps/web/src/**.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}- | ||
- name: 🏗 Build web-app | ||
working-directory: apps/web | ||
run: | | ||
pnpm --filter=web build | ||
env: | ||
NEXT_IGNORE_ESLINT: true | ||
NEXT_IGNORE_TYPE_CHECK: true | ||
NEXT_DISABLE_SOURCEMAPS: true | ||
NEXT_TELEMETRY_DISABLED: true | ||
|
||
- name: 📥 Install playwright | ||
uses: ./.github/actions/playwright-install | ||
|
||
- name: 🧪 Run E2E playwright tests on web app | ||
working-directory: apps/web | ||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:e2e | ||
env: | ||
CI: 1 | ||
|
||
- name: 📤 Upload testing artifacts | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: web-app-playwright-test-results-${{ runner.os }} | ||
path: apps/web/e2e/.out |
Empty file.
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
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.
67318e6
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:
next-starter-tpl-storybook – ./apps/storybook
next-starter-tpl-storybook.vercel.app
next-starter-tpl-storybook-git-master-wayofdev.vercel.app
next-starter-tpl-storybook-wayofdev.vercel.app
67318e6
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:
next-starter-tpl-web – ./apps/web
next-starter-tpl-web-git-master-wayofdev.vercel.app
next-starter-tpl-web-wayofdev.vercel.app
next-starter-tpl-web.vercel.app
next-starter-tpl.wayof.dev
67318e6
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:
next-starter-tpl-docs – ./apps/docs
next-starter-tpl-docs.vercel.app
next-starter-tpl-docs-wayofdev.vercel.app
next-starter-tpl-docs.wayof.dev
next-starter-tpl-docs-git-master-wayofdev.vercel.app