-
Notifications
You must be signed in to change notification settings - Fork 2
113 lines (97 loc) · 2.97 KB
/
ci-nextjs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build - NextJS App
on:
pull_request:
types: [assigned, opened, synchronize, reopened, "ready_for_review"]
paths:
- '.github/workflows/**'
- 'nextjs-app-v13/**'
- 'webdriver-helpers/**'
- 'wdio.conf.js'
push:
branches:
- main
concurrency:
group: CI-NextJS-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
jobs:
# Commenting these out for now as there's currently an issue with Next.
# build-next-app-windows-node18:
# name: Windows - Node 18
# uses: ./.github/workflows/build.yml
# with:
# deploy: false
# node-version: 18
# os: 'windows-latest'
# package-name: 'nextjs-app-v13'
# secrets: inherit
# build-next-app-windows-node20:
# name: Windows - Node 20
# uses: ./.github/workflows/build.yml
# with:
# deploy: false
# node-version: 20
# os: 'windows-latest'
# package-name: 'nextjs-app-v13'
# secrets: inherit
build-next-app-ubuntu-node18:
name: Ubuntu - Node 18
uses: ./.github/workflows/build.yml
with:
deploy: false
node-version: 18
os: 'ubuntu-latest'
package-name: 'nextjs-app-v13'
secrets: inherit
build-deploy-next-app-ubuntu-node20:
name: Ubuntu - Node 20
uses: ./.github/workflows/build.yml
with:
deploy: true
node-version: 20
os: 'ubuntu-latest'
amplify-app-id: 'd1106vmj1ozg8d'
package-name: 'nextjs-app-v13'
package-dist-directory: './nextjs-app-v13/out'
bucket-name-preview: 'pie-aperture-preview'
bucket-name-main: 'pie-aperture'
secrets: inherit
browser-tests:
needs: 'build-deploy-next-app-ubuntu-node20'
name: Run System / Visual Tests
runs-on: ubuntu-latest
steps:
# Checkout the Repo
- name: Checkout
uses: actions/checkout@v3
# Setup Node
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install Dependencies
shell: bash
run: yarn
# Setup Playwright
- name: Setup Playwright
uses: ./.github/actions/setup-playwright
- name: Run System Tests
shell: bash
run: yarn test:system --filter=nextjs-app-v13
- uses: actions/upload-artifact@v3
if: always()
with:
name: nextjs-playwright-report
path: playwright-reports/nextjs-playwright-report/
retention-days: 7
- name: Run Percy Tests
shell: bash
run: yarn test:visual --filter=nextjs-app-v13
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
NEXT_AMPLIFY_ID: d1106vmj1ozg8d
PERCY_TOKEN_PIE_APERTURE_NEXT_13: ${{ secrets.PERCY_TOKEN_PIE_APERTURE_NEXT_13 }}
PR_NUMBER: ${{ github.event.number }}