-
Notifications
You must be signed in to change notification settings - Fork 417
129 lines (107 loc) · 3.8 KB
/
node.js.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Node
on:
pull_request:
push:
branches-ignore: "dependabot/**"
# Once a week every Monday
schedule:
- cron: "42 1 * * 1"
permissions:
contents: read
env:
NODE_VERSION: 20.x
jobs:
build-and-test:
runs-on: ubuntu-latest
name: ${{ matrix.BROWSER }}
strategy:
fail-fast: false
matrix:
BROWSER: [chrome, firefox]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
- name: Install npm dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: |
npm run test:unit -- -h -b ${{ matrix.BROWSER }} \
--jquery 1.12.4 \
--jquery 2.2.4 \
--jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 \
--jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 \
--jquery 3.x-git --jquery git \
--retries 3 --hard-retries 1
edge:
runs-on: windows-latest
name: edge
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: |
npm run test:unit -- -h -b edge `
--jquery 1.12.4 `
--jquery 2.2.4 `
--jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 `
--jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 `
--jquery 3.x-git --jquery git `
--retries 3 --hard-retries 1
safari:
runs-on: macos-latest
name: safari
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: |
npm run test:unit -- -b safari \
--jquery 1.12.4 \
--jquery 2.2.4 \
--jquery 3.0.0 --jquery 3.1.1 --jquery 3.2.1 --jquery 3.3.1 \
--jquery 3.4.1 --jquery 3.5.1 --jquery 3.6.4 --jquery 3.7.1 \
--jquery 3.x-git --jquery git \
--retries 3 --hard-retries 1