-
Notifications
You must be signed in to change notification settings - Fork 23
114 lines (111 loc) · 3.35 KB
/
percy-update-base.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
114
name: percy-update-base
on:
push:
branches:
- main
repository_dispatch:
types: [deploy-canary]
concurrency:
group: percy-update-base-${{ github.ref }}
cancel-in-progress: true
jobs:
percy-update:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom-nextjs-test'
runs-on: macos-latest
strategy:
matrix:
node-version: ["14.x"]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: "14.x"
cache: yarn
- name: Caching NextJS
id: nextjs-cache-build
uses: actions/cache@v2
with:
path: |
.next
out
key: ${{ runner.os }}-percy-update-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-percy-update-
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Grab latest canary release
run: yarn update-canary
- name: Set env vars
uses: ./.github/actions/set-dotenv
with:
env-file: .env
env:
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }}
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }}
PROFILE_HOST: ${{ secrets.PROFILE_HOST }}
SASS_PATH: node_modules:src
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
- name: Build project
run: yarn build
- name: Export project
run: yarn export
- name: Run e2e tests
run: yarn test:e2e:local
- name: Notify Slack upon failure
uses: act10ns/slack@v1
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
percy-update-upstream:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom-nextjs-test'
runs-on: macos-latest
strategy:
matrix:
node-version: ["14.x"]
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: "14.x"
cache: yarn
- name: Caching NextJS
id: nextjs-cache-build
uses: actions/cache@v2
with:
path: |
.next
out
key: ${{ runner.os }}-percy-update-upstream-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-percy-update-upstream-
- name: Install dependencies
run: yarn install --immutable --immutable-cache
- name: Grab latest canary release
run: yarn update-canary
- name: Set env vars
uses: ./.github/actions/set-dotenv
with:
env-file: .env
env:
KALTURA_PARTNER_ID: ${{ secrets.KALTURA_PARTNER_ID }}
KALTURA_UICONF_ID: ${{ secrets.KALTURA_UICONF_ID }}
PROFILE_HOST: ${{ secrets.PROFILE_HOST }}
SASS_PATH: node_modules:src
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_UPSTREAM }}
- name: Build project
run: yarn build
- name: Export project
run: yarn export
- name: Run e2e tests
run: yarn test:e2e:local
- name: Notify Slack upon failure
uses: act10ns/slack@v1
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}