Skip to content

Commit 6f3a7b7

Browse files
author
root
committed
ci: add dedicated e2e workflow and trigger preview deploys on all non-main PRs
1 parent 5233783 commit 6f3a7b7

3 files changed

Lines changed: 43 additions & 38 deletions

File tree

.github/workflows/deployment-pr.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
name: Deploy to Firebase Hosting on PR
55
"on":
66
pull_request:
7-
branches:
8-
- dev
9-
- feat/integrate-wrapped
7+
branches-ignore:
8+
- main
109
workflow_dispatch:
1110

1211
jobs:

.github/workflows/e2e.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
branches-ignore:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
e2e:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
cache: pnpm
22+
- name: install dependencies
23+
run: pnpm install --frozen-lockfile
24+
- name: install playwright browsers
25+
run: pnpm exec playwright install --with-deps chromium
26+
- name: run e2e tests
27+
run: pnpm test:e2e
28+
- uses: actions/upload-artifact@v4
29+
if: failure()
30+
with:
31+
name: playwright-report
32+
path: test-results/
33+
retention-days: 7

.github/workflows/husky.yml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: CI
42

5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
- push
9-
# Allows you to run this workflow manually from the Actions tab
10-
- workflow_dispatch
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
branches-ignore:
9+
- main
10+
workflow_dispatch:
1111

12-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1312
jobs:
14-
lint-and-prettify:
15-
# The type of runner that the job will run on
13+
lint-and-unit:
1614
runs-on: ubuntu-latest
17-
18-
# Steps represent a sequence of tasks that will be executed as part of the job
1915
steps:
20-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2116
- uses: actions/checkout@v4
2217
- uses: pnpm/action-setup@v4
2318
- uses: actions/setup-node@v4
@@ -31,25 +26,3 @@ jobs:
3126
- run: pnpm test
3227
- run: pnpm ci-dev-build
3328
- run: pnpm test:generated
34-
35-
e2e:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v4
39-
- uses: pnpm/action-setup@v4
40-
- uses: actions/setup-node@v4
41-
with:
42-
node-version: 22
43-
cache: pnpm
44-
- name: install dependencies
45-
run: pnpm install --frozen-lockfile
46-
- name: install playwright browsers
47-
run: pnpm exec playwright install --with-deps chromium
48-
- name: run e2e tests
49-
run: pnpm test:e2e
50-
- uses: actions/upload-artifact@v4
51-
if: failure()
52-
with:
53-
name: playwright-report
54-
path: test-results/
55-
retention-days: 7

0 commit comments

Comments
 (0)