-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.41 KB
/
e2e-tests.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
name: e2e-tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: e2e-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
e2e-tests:
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom-website'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x']
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: '18.x'
cache: yarn
- name: Caching Gatsby
id: gatsby-cache-build
uses: actions/cache@v2
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
run: yarn install
- name: Set env vars
uses: ./.github/actions/set-dotenv
with:
env-file: .env.production
env:
GATSBY_CPU_COUNT: 1
- name: Building Gatsby
run: yarn build
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
CI: true
- name: Run e2e tests
run: yarn test:e2e:local
- uses: act10ns/slack@v1
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}