Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
schedule:
# 00:00 on Saturdays
- cron: '0 0 * * SAT'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 14.x]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '2'

- name: Test on Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run test

- name: Upload test coverage report to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![npm package](https://badge.fury.io/js/strings-to-regex.svg)](https://badge.fury.io/js/strings-to-regex)
![node version](https://img.shields.io/node/v/strings-to-regex.svg)
![npm type definitions](https://img.shields.io/npm/types/strings-to-regex)
[![Build Status](https://travis-ci.org/wimpyprogrammer/strings-to-regex.svg?branch=main)](https://travis-ci.org/wimpyprogrammer/strings-to-regex)
![Tests status](https://github.com/wimpyprogrammer/strings-to-regex/workflows/Tests/badge.svg)
[![codecov](https://codecov.io/gh/wimpyprogrammer/strings-to-regex/branch/main/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/strings-to-regex)
[![Known Vulnerabilities](https://snyk.io/test/github/wimpyprogrammer/strings-to-regex/badge.svg)](https://snyk.io/test/github/wimpyprogrammer/strings-to-regex)

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"prepublish": "npx publish-please guard",
"publish-please": "npx publish-please",
"publish-please-prereqs": "npm run lint && npm run test && npm run build",
"test": "jest --coverage",
"travisci": "npm run lint && npm run test && codecov && npx snyk test"
"test": "jest --coverage"
},
"jest": {
"collectCoverageFrom": [
Expand Down