Skip to content

Commit ee22050

Browse files
committed
[ci] Use GitHub Actions
1 parent d2979b5 commit ee22050

File tree

5 files changed

+41
-29
lines changed

5 files changed

+41
-29
lines changed

.github/workflows/ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node:
13+
- 12
14+
- 14
15+
- 16
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node }}
21+
- run: npm install
22+
- run: npm test
23+
- uses: coverallsapp/[email protected]
24+
if: matrix.node == 12
25+
with:
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
test-browser:
28+
runs-on: ubuntu-latest
29+
env:
30+
SAUCE_USERNAME: url-parse
31+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions/setup-node@v2
35+
with:
36+
node-version: 12
37+
- run: npm install
38+
- run: npm run test-browser

.travis.yml

-25
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# url-parse
22

3-
[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](https://img.shields.io/npm/v/url-parse.svg?style=flat-square)](https://www.npmjs.com/package/url-parse)[![Build Status](https://img.shields.io/travis/unshiftio/url-parse/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/url-parse)[![Dependencies](https://img.shields.io/david/unshiftio/url-parse.svg?style=flat-square)](https://david-dm.org/unshiftio/url-parse)[![Coverage Status](https://img.shields.io/coveralls/unshiftio/url-parse/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/url-parse?branch=master)[![IRC channel](https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](https://webchat.freenode.net/?channels=unshift)
3+
[![Made by unshift](https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square)](http://unshift.io)[![Version npm](https://img.shields.io/npm/v/url-parse.svg?style=flat-square)](https://www.npmjs.com/package/url-parse)[![Build Status](https://img.shields.io/github/workflow/status/unshiftio/url-parse/CI/master?label=CI&style=flat-square)](https://github.com/unshiftio/url-parse/actions?query=workflow%3ACI+branch%3Amaster)[![Dependencies](https://img.shields.io/david/unshiftio/url-parse.svg?style=flat-square)](https://david-dm.org/unshiftio/url-parse)[![Coverage Status](https://img.shields.io/coveralls/unshiftio/url-parse/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/url-parse?branch=master)[![IRC channel](https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square)](https://webchat.freenode.net/?channels=unshift)
44

55
[![Sauce Test Status](https://saucelabs.com/browser-matrix/url-parse.svg)](https://saucelabs.com/u/url-parse)
66

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"browserify": "rm -rf dist && mkdir -p dist && browserify index.js -s URLParse -o dist/url-parse.js",
88
"minify": "uglifyjs dist/url-parse.js --source-map -cm -o dist/url-parse.min.js",
9-
"test": "c8 --reporter=html --reporter=text mocha test/test.js",
9+
"test": "c8 --reporter=lcov --reporter=text mocha test/test.js",
1010
"test-browser": "node test/browser.js",
1111
"prepublishOnly": "npm run browserify && npm run minify",
1212
"watch": "mocha --watch test/test.js"
@@ -40,7 +40,6 @@
4040
"assume": "^2.2.0",
4141
"browserify": "^17.0.0",
4242
"c8": "^7.3.1",
43-
"coveralls": "^3.1.0",
4443
"mocha": "^8.0.1",
4544
"pre-commit": "^1.2.2",
4645
"sauce-browsers": "^2.0.0",

test/browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ const platforms = sauceBrowsers([
2929
});
3030

3131
run(path.join(__dirname, 'test.js'), 'saucelabs', {
32+
jobInfo: { name: pkg.name, build: process.env.GITHUB_RUN_ID },
3233
html: path.join(__dirname, 'index.html'),
3334
accessKey: process.env.SAUCE_ACCESS_KEY,
3435
username: process.env.SAUCE_USERNAME,
3536
browserify: true,
3637
disableSSL: true,
37-
name: pkg.name,
3838
parallel: 5,
3939
platforms
4040
}).done((results) => {

0 commit comments

Comments
 (0)