-
Notifications
You must be signed in to change notification settings - Fork 218
92 lines (88 loc) · 2.92 KB
/
integration.yaml
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
name: Integration
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '00 01 * * 1' # at 1:00 on mondays
permissions:
contents: read
defaults:
run:
# Setting an explicit bash shell ensures GitHub Actions enables pipefail mode too,
# rather than only error on exit (improving failure UX when pipes are used). See:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
shell: bash
jobs:
integration-with-canvas:
name: Integration (jsdom + node-canvas)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ./tough-cookie
- uses: actions/checkout@v4
with:
repository: jsdom/jsdom
ref: main
path: ./jsdom
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install required image manipulation packages with APT
run: sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Build tough-cookie
id: package
run: |
npm ci
npm run build
echo "tough_cookie_tarball=$(npm pack)" >> "$GITHUB_OUTPUT"
working-directory: ./tough-cookie
- name: Setup HOSTS file for Web Platform Test server
run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts
working-directory: ./jsdom
- name: Install jsdom dependencies
run: |
npm ci
npm uninstall tough-cookie
npm install ../tough-cookie/${{ steps.package.outputs.tough_cookie_tarball }}
npm install canvas
working-directory: ./jsdom
- name: Run tests
run: npm test -- --retries 1
working-directory: ./jsdom
integration:
name: Integration (jsdom)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ./tough-cookie
- uses: actions/checkout@v4
with:
repository: jsdom/jsdom
ref: main
path: ./jsdom
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Build tough-cookie
id: package
run: |
npm ci
npm run build
echo "tough_cookie_tarball=$(npm pack)" >> "$GITHUB_OUTPUT"
working-directory: ./tough-cookie
- name: Setup HOSTS file for Web Platform Test server
run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts
working-directory: ./jsdom
- name: Install jsdom dependencies
run: |
npm ci
npm uninstall tough-cookie
npm install ../tough-cookie/${{ steps.package.outputs.tough_cookie_tarball }}
working-directory: ./jsdom
- name: Run tests
run: npm run test -- --retries 1
working-directory: ./jsdom