-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Pavel Mineev
committed
Aug 23, 2022
1 parent
0b0c811
commit 8d980b3
Showing
5 changed files
with
30 additions
and
45 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: frontend | ||
name: e2e | ||
|
||
on: | ||
push: | ||
|
@@ -15,55 +15,18 @@ on: | |
|
||
jobs: | ||
tests: | ||
name: E2E Tests | ||
name: Tests | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16.15.1" | ||
|
||
- name: Start containers | ||
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f compose-e2e-test.yml up -d --build | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
id: pnpm-install | ||
with: | ||
version: 7 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- name: Setup pnpm cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm i | ||
working-directory: frontend/e2e | ||
|
||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
working-directory: frontend/e2e | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
working-directory: frontend/e2e | ||
- name: Build & run containers | ||
run: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f compose-e2e-test.yml up -d --build --quiet-pull | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: playwright-report | ||
path: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM mcr.microsoft.com/playwright:v1.25.0-focal | ||
|
||
ENV CI true | ||
WORKDIR /frontend | ||
|
||
COPY ./package.json ./pnpm-workspace.yaml ./pnpm-lock.yaml /frontend/ | ||
COPY ./e2e/package.json /frontend/e2e/ | ||
RUN corepack enable pnpm && pnpm install | ||
|
||
COPY ./e2e/tsconfig.json ./e2e/playwright.config.ts /frontend/e2e/ | ||
COPY ./e2e/tests /frontend/e2e/tests/ | ||
|
||
WORKDIR /frontend/e2e | ||
|
||
RUN pnpm test |
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