Skip to content

Commit 0b106bd

Browse files
authored
Replace TravisCI on Github Actions (#50)
* Replace TravisCI on Github Actions * Run eslint only on one CI env * Update badges * Remove coveralls from dependencies
1 parent 8eb6695 commit 0b106bd

File tree

6 files changed

+52
-43
lines changed

6 files changed

+52
-43
lines changed

.github/workflows/node.js.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '10 2 * * *'
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
node-version:
18+
- 12
19+
- 14
20+
- 16
21+
- 17
22+
os:
23+
- ubuntu-latest
24+
- windows-latest
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
- run: npm i
33+
- run: npm test
34+
- run: npm run eslint
35+
if: ${{ matrix.node-version == '16' && matrix.os == 'ubuntu-latest' }}
36+
- name: Coveralls
37+
if: ${{ matrix.node-version == '16' && matrix.os == 'ubuntu-latest' }}
38+
uses: coverallsapp/github-action@master
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
- name: Publish codeclimate code coverage
42+
if: ${{ matrix.node-version == '16' && matrix.os == 'ubuntu-latest' }}
43+
uses: paambaati/codeclimate-action@v3.0.0
44+
env:
45+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
46+
with:
47+
coverageLocations: |
48+
${{github.workspace}}/coverage/lcov.info:lcov

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
2+
package-lock.json
23
npm-debug.log
34
coverage
45
.idea

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
## Introduction
22
Parse urls from css file
33

4-
[![Build Status](https://img.shields.io/travis/website-scraper/node-css-url-parser/master.svg?style=flat)](https://travis-ci.com/github/website-scraper/node-css-url-parser)
4+
[![Node.js CI](https://github.com/website-scraper/node-css-url-parser/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/website-scraper/node-css-url-parser/)
55
[![Coverage Status](https://coveralls.io/repos/website-scraper/node-css-url-parser/badge.svg)](https://coveralls.io/r/website-scraper/node-css-url-parser)
66
[![Code Climate](https://codeclimate.com/github/website-scraper/node-css-url-parser/badges/gpa.svg)](https://codeclimate.com/github/website-scraper/node-css-url-parser)
77
[![Version](https://img.shields.io/npm/v/css-url-parser.svg?style=flat)](https://www.npmjs.org/package/css-url-parser)
88
[![Downloads](https://img.shields.io/npm/dm/css-url-parser.svg?style=flat)](https://www.npmjs.org/package/css-url-parser)
9-
[![Dependency Status](https://david-dm.org/website-scraper/node-css-url-parser.svg?style=flat)](https://david-dm.org/website-scraper/node-css-url-parser)
109
[![Gitter](https://badges.gitter.im/website-scraper/node-css-url-parser.svg)](https://gitter.im/website-scraper/node-css-url-parser?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
1110

1211

appveyor.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"readmeFilename": "README.md",
66
"main": "index.js",
77
"scripts": {
8-
"test": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && npm run eslint",
8+
"test": "c8 --all --reporter=text --reporter=lcov mocha --recursive",
99
"eslint": "eslint lib/** index.js"
1010
},
1111
"keywords": [
@@ -24,9 +24,8 @@
2424
"author": "Sophia Antipenko <sophia@antipenko.pp.ua>",
2525
"license": "MIT",
2626
"devDependencies": {
27-
"coveralls": "^3.0.0",
27+
"c8": "^7.10.0",
2828
"eslint": "^4.15.0",
29-
"istanbul": "^0.4.5",
3029
"mocha": "^5.0.0",
3130
"should": "^13.0.0"
3231
},

0 commit comments

Comments
 (0)