-
Notifications
You must be signed in to change notification settings - Fork 13
59 lines (50 loc) · 1.72 KB
/
sauce.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
name: Sauce CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
browser-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up Ruby for Jekyll
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.3
- name: Install dependencies with Yarn
run: |
yarn install
yarn after-install
- name: Start local Design System website server
run: |
yarn start &
sleep 5
- name: Set up Sauce Connect
uses: saucelabs/sauce-connect-action@v2
with:
# These credentials are from @contolini's CFPB Sauce Labs account
# They're defined on the repo's settings page:
# https://github.com/cfpb/design-system/settings/secrets
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
configFile: ${{ github.workspace }}/.sauce/config.yml
- name: Run e2e browser tests
# Don't run these tests on forks. It would be nice to instead check
# to see if the Sauce Labs environment variables are defined, but that
# doesn't seem currently possible:
# https://github.com/actions/runner/issues/520
if: ${{ github.repository_owner == 'cfpb' }}
env:
# These credentials are from @contolini's CFPB Sauce Labs account
# They're defined on the repo's settings page:
# https://github.com/cfpb/design-system/settings/secrets
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: yarn test:browser:cloud