Skip to content

Commit 9ed9418

Browse files
committed
Replace Saucelabs with Playwright
Also reorganized npm scripts.
1 parent ef0fc29 commit 9ed9418

File tree

18 files changed

+3495
-487
lines changed

18 files changed

+3495
-487
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.sublime-project
55
*.sublime-workspace
66
npm-debug.log
7-
sauce_connect.log*
87
.idea
98
yarn-error.log
109
node_modules

.github/workflows/ci.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ on:
99
jobs:
1010
lint:
1111
name: Lint
12-
runs-on: ubuntu-latest
12+
runs-on: 'ubuntu-latest'
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v2
1616

17+
- name: Setup Node.js
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: '16'
21+
1722
- name: Install dependencies
1823
run: npm ci
1924

20-
- name: Lint (ESlint)
25+
- name: Lint
2126
run: npm run lint
2227

23-
- name: Lint (Prettier)
24-
run: npm run check-format
25-
26-
- name: Lint (TypeScript)
27-
run: npm run dtslint
28-
2928
test:
3029
name: Test
3130
runs-on: ${{ matrix.operating-system }}
@@ -52,3 +51,31 @@ jobs:
5251

5352
- name: Test
5453
run: npm run test
54+
55+
browser:
56+
name: Browser Tests
57+
runs-on: 'ubuntu-latest'
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
with:
62+
submodules: true
63+
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v2
66+
with:
67+
node-version: '16'
68+
69+
- name: Install dependencies
70+
run: npm ci
71+
72+
- name: Install Playwright
73+
run: |
74+
npx playwright install-deps
75+
npx playwright install
76+
77+
- name: Build
78+
run: npx grunt prepare
79+
80+
- name: Test
81+
run: npm run test:browser

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.sublime-project
55
*.sublime-workspace
66
npm-debug.log
7-
sauce_connect.log*
87
.idea
98
/yarn-error.log
109
/yarn.lock

Gruntfile.js

Lines changed: 15 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -165,48 +165,6 @@ module.exports = function(grunt) {
165165
}
166166
}
167167
},
168-
'saucelabs-mocha': {
169-
all: {
170-
options: {
171-
build: process.env.TRAVIS_JOB_ID,
172-
urls: [
173-
'http://localhost:9999/spec/?headless=true',
174-
'http://localhost:9999/spec/amd.html?headless=true'
175-
],
176-
detailedError: true,
177-
concurrency: 4,
178-
browsers: [
179-
{ browserName: 'chrome' },
180-
{ browserName: 'firefox', platform: 'Linux' }
181-
// {browserName: 'safari', version: 9, platform: 'OS X 10.11'},
182-
// {browserName: 'safari', version: 8, platform: 'OS X 10.10'},
183-
// {
184-
// browserName: 'internet explorer',
185-
// version: 11,
186-
// platform: 'Windows 8.1'
187-
// },
188-
// {
189-
// browserName: 'internet explorer',
190-
// version: 10,
191-
// platform: 'Windows 8'
192-
// }
193-
]
194-
}
195-
},
196-
sanity: {
197-
options: {
198-
build: process.env.TRAVIS_JOB_ID,
199-
urls: [
200-
'http://localhost:9999/spec/umd.html?headless=true',
201-
'http://localhost:9999/spec/amd-runtime.html?headless=true',
202-
'http://localhost:9999/spec/umd-runtime.html?headless=true'
203-
],
204-
detailedError: true,
205-
concurrency: 2,
206-
browsers: [{ browserName: 'chrome' }]
207-
}
208-
}
209-
},
210168

211169
bgShell: {
212170
integrationTests: {
@@ -238,59 +196,42 @@ module.exports = function(grunt) {
238196
grunt.loadNpmTasks('grunt-contrib-watch');
239197
grunt.loadNpmTasks('grunt-babel');
240198
grunt.loadNpmTasks('grunt-bg-shell');
241-
grunt.loadNpmTasks('@knappi/grunt-saucelabs');
242199
grunt.loadNpmTasks('grunt-webpack');
243200

244201
grunt.task.loadTasks('tasks');
245202

246-
this.registerTask(
247-
'build',
248-
'Builds a distributable version of the current project',
249-
['parser', 'node', 'globals']
250-
);
251-
252-
this.registerTask('node', ['babel:cjs']);
253-
this.registerTask('globals', ['webpack']);
254-
255-
this.registerTask('release', 'Build final packages', [
256-
'amd',
203+
grunt.registerTask('node', ['babel:cjs']);
204+
grunt.registerTask('amd', ['babel:amd', 'requirejs']);
205+
grunt.registerTask('globals', ['webpack']);
206+
grunt.registerTask('release', 'Build final packages', [
257207
'uglify',
258208
'test:min',
259209
'copy:dist',
260210
'copy:components',
261211
'copy:cdnjs'
262212
]);
263213

264-
this.registerTask('amd', ['babel:amd', 'requirejs']);
265-
266-
this.registerTask('test', ['test:bin', 'test:cov']);
267-
268-
grunt.registerTask('bench', ['metrics']);
269-
270-
if (process.env.SAUCE_ACCESS_KEY) {
271-
grunt.registerTask('sauce', ['concat:tests', 'connect', 'saucelabs-mocha']);
272-
} else {
273-
grunt.registerTask('sauce', []);
274-
}
275-
276-
// Requires secret properties (saucelabs-credentials etc.) from .travis.yaml
214+
// Requires secret properties from .travis.yaml
277215
grunt.registerTask('extensive-tests-and-publish-to-aws', [
278216
'default',
279217
'bgShell:integrationTests',
280-
'sauce',
281218
'metrics',
282219
'publish-to-aws'
283220
]);
284-
grunt.registerTask('on-file-change', [
285-
'build',
286-
'amd',
287-
'concat:tests',
288-
'test'
289-
]);
221+
222+
grunt.registerTask('on-file-change', ['build', 'concat:tests', 'test']);
290223

291224
// === Primary tasks ===
292225
grunt.registerTask('dev', ['clean', 'connect', 'watch']);
293226
grunt.registerTask('default', ['clean', 'build', 'test', 'release']);
227+
grunt.registerTask('test', ['test:bin', 'test:cov']);
228+
grunt.registerTask('bench', ['metrics']);
229+
grunt.registerTask('prepare', ['build', 'concat:tests']);
230+
grunt.registerTask(
231+
'build',
232+
'Builds a distributable version of the current project',
233+
['parser', 'node', 'amd', 'globals']
234+
);
294235
grunt.registerTask('integration-tests', [
295236
'default',
296237
'bgShell:integrationTests'

README.markdown

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![CI Build Status](https://img.shields.io/github/workflow/status/handlebars-lang/handlebars.js/ci/master)](https://github.com/handlebars-lang/handlebars.js/actions)
2-
[![Selenium Test Status](https://saucelabs.com/buildstatus/handlebars)](https://saucelabs.com/u/handlebars)
32
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/handlebars/badge?style=rounded)](https://www.jsdelivr.com/package/npm/handlebars)
43
[![Bundle size](https://img.shields.io/bundlephobia/minzip/handlebars?label=minified%20%2B%20gzipped)](https://bundlephobia.com/package/handlebars)
54
[![Install size](https://packagephobia.com/badge?p=handlebars)](https://packagephobia.com/result?p=handlebars)
@@ -91,8 +90,6 @@ Handlebars has been designed to work in any ECMAScript 3 environment. This inclu
9190
Older versions and other runtimes are likely to work but have not been formally
9291
tested. The compiler requires `JSON.stringify` to be implemented natively or via a polyfill. If using the precompiler this is not necessary.
9392

94-
[![Selenium Test Status](https://saucelabs.com/browser-matrix/handlebars.svg)](https://saucelabs.com/u/handlebars)
95-
9693
Performance
9794
-----------
9895

0 commit comments

Comments
 (0)