Skip to content

Commit

Permalink
Dev: Use Github Actions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Apr 6, 2021
1 parent 722cf82 commit e18885e
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 53 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: "increase"
commit-message:
prefix: "Deps"
prefix-development: "Dev"
75 changes: 75 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test

on:
push

jobs:
lint:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- run: npm ci
- run: npm run test-main

coverage:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- run: npm ci
- run: npm run cover-main
- name: Send report to Coveralls
uses: coverallsapp/github-action@v1.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 0 additions & 23 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 @@ -5,7 +5,7 @@
## Current status

[![NPM version](https://img.shields.io/npm/v/got-resume.svg)](https://www.npmjs.com/package/got-resume)
[![Build Status](https://img.shields.io/travis/overlookmotel/got-resume/master.svg)](https://travis-ci.org/overlookmotel/got-resume)
[![Build Status](https://img.shields.io/github/workflow/status/overlookmotel/got-resume/Test.svg)](https://github.com/overlookmotel/got-resume/actions)
[![Dependency Status](https://img.shields.io/david/overlookmotel/got-resume.svg)](https://david-dm.org/overlookmotel/got-resume)
[![Dev dependency Status](https://img.shields.io/david/dev/overlookmotel/got-resume.svg)](https://david-dm.org/overlookmotel/got-resume)
[![Coverage Status](https://img.shields.io/coveralls/overlookmotel/got-resume/master.svg)](https://coveralls.io/r/overlookmotel/got-resume)
Expand Down
25 changes: 0 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@overlookmotel/eslint-config": "^7.2.1",
"@overlookmotel/eslint-config-jest": "^4.1.1",
"@overlookmotel/eslint-config-node": "^2.1.2",
"coveralls": "^3.1.0",
"cross-env": "^7.0.3",
"eslint": "^7.23.0",
"eslint-config-airbnb-base": "^14.2.1",
Expand Down Expand Up @@ -56,9 +55,7 @@
"lint-fix": "eslint . --fix",
"test-main": "jest",
"cover": "npm run cover-main && rm -rf coverage",
"coveralls": "npm run cover-main && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"cover-main": "cross-env COVERAGE=true jest --coverage",
"travis": "if [ $COVERAGE ]; then npm run coveralls; else npm test; fi"
"cover-main": "cross-env COVERAGE=true jest --coverage"
},
"engines": {
"node": ">=10"
Expand Down

0 comments on commit e18885e

Please sign in to comment.