-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (53 loc) · 1.66 KB
/
test.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
name: Run e2e tests
on:
pull_request:
types:
- opened
- reopened
- synchronize # canary on new commit
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all tags for ship-it
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/lerna.json') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-
${{ runner.os }}-build-
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm install
- name: Install Puppeteer Browsers
run: PUPPETEER_CACHE_DIR=/home/runner/.cache/puppeteer npx puppeteer install --browser chrome
- name: Verify Puppeteer Installation
run: |
echo "Puppeteer version:"
npx puppeteer --version
echo "Installed browsers:"
ls -l /home/runner/.cache/puppeteer
- name: Install Chrome
run: sudo apt-get install -y google-chrome-stable
- name: Run tests
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
# Increase the Jest timeout
echo "module.exports = { testTimeout: 30000 };" > jest.config.js
npm run test