Skip to content

Commit 1af3fc7

Browse files
committed
Migrate from travis ci to github actions
1 parent cdc175b commit 1af3fc7

File tree

5 files changed

+30
-23
lines changed

5 files changed

+30
-23
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
on:
3+
push:
4+
jobs:
5+
ci:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node: [12, 14, 16]
10+
steps:
11+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
12+
uses: actions/checkout@v2
13+
- name: Setup node
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: ${{ matrix.node }}
17+
- name: Install dependencies
18+
run: npm ci
19+
- name: Run Tests
20+
env:
21+
SKIP_HEALTH_CHECKS: 1
22+
run: npm run test

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
test/
2+
.github/workflows/
23
.gitignore
34
.npmignore
4-
.travis.yml
55
*.log
66
*.txt

.travis.yml

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

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# proxy-lists
22

3-
[![Build Status](https://travis-ci.org/chill117/proxy-lists.svg?branch=master)](https://travis-ci.org/chill117/proxy-lists)
3+
![Build Status](https://github.com/chill117/proxy-lists/actions/workflows/ci.yml/badge.svg)
44

55
Node.js module for getting proxies from publicly available proxy lists. Support for more than two dozen different proxy lists. You can see the full list of proxy sources [here](https://github.com/chill117/proxy-lists/tree/master/sources).
66

test/unit/getProxies.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ describe('getProxies([options, ]cb)', function() {
292292

293293
describe('health checks', function() {
294294

295+
before(function() {
296+
if (process.env.SKIP_HEALTH_CHECKS) {
297+
return this.skip();
298+
}
299+
});
300+
295301
var sourcesWhiteList = (process.env.SOURCES && process.env.SOURCES.split(',')) || null;
296302
var dataSourcer = ProxyLists.prepareDataSourcer();
297303
var sources = dataSourcer.listSources({
@@ -310,11 +316,6 @@ describe('getProxies([options, ]cb)', function() {
310316

311317
it('should return valid proxies', function(done) {
312318

313-
if (process.env.TRAVIS_CI) {
314-
console.log('Skipping this test because it doesn\'t run well on travis-ci platform.');
315-
return this.skip();
316-
}
317-
318319
this.timeout(60000);
319320

320321
var options = {

0 commit comments

Comments
 (0)