Skip to content

Commit 4db67cf

Browse files
Merge pull request #10 from wimpyprogrammer/feature/github-actions
Move from TravisCI to GitHub Actions
2 parents f631e10 + 7427266 commit 4db67cf

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

.github/workflows/tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
schedule:
9+
# 00:00 on Saturdays
10+
- cron: '0 0 * * SAT'
11+
workflow_dispatch:
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [10.x, 14.x]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: '2'
25+
26+
- name: Test on Node ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
- run: npm install
31+
- run: npm run lint
32+
- run: npm run test
33+
34+
- name: Upload test coverage report to Codecov
35+
uses: codecov/codecov-action@v1
36+
with:
37+
fail_ci_if_error: true
38+
39+
- name: Run Snyk to check for vulnerabilities
40+
uses: snyk/actions/node@master
41+
env:
42+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![npm package](https://badge.fury.io/js/strings-to-regex.svg)](https://badge.fury.io/js/strings-to-regex)
44
![node version](https://img.shields.io/node/v/strings-to-regex.svg)
55
![npm type definitions](https://img.shields.io/npm/types/strings-to-regex)
6-
[![Build Status](https://travis-ci.org/wimpyprogrammer/strings-to-regex.svg?branch=main)](https://travis-ci.org/wimpyprogrammer/strings-to-regex)
6+
![Tests status](https://github.com/wimpyprogrammer/strings-to-regex/workflows/Tests/badge.svg)
77
[![codecov](https://codecov.io/gh/wimpyprogrammer/strings-to-regex/branch/main/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/strings-to-regex)
88
[![Known Vulnerabilities](https://snyk.io/test/github/wimpyprogrammer/strings-to-regex/badge.svg)](https://snyk.io/test/github/wimpyprogrammer/strings-to-regex)
99

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"prepublish": "npx publish-please guard",
3030
"publish-please": "npx publish-please",
3131
"publish-please-prereqs": "npm run lint && npm run test && npm run build",
32-
"test": "jest --coverage",
33-
"travisci": "npm run lint && npm run test && codecov && npx snyk test"
32+
"test": "jest --coverage"
3433
},
3534
"jest": {
3635
"collectCoverageFrom": [

0 commit comments

Comments
 (0)