Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbllmnn committed Jan 26, 2021
1 parent 6906adf commit e168182
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 12 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test successful build of base-util

on: pull_request

jobs:
build:
runs-on: ubuntu-latest

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

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Build artifacts 🏗️
run: npm run build
39 changes: 39 additions & 0 deletions .github/workflows/on-push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run coveralls

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Generate coverage 🧪
run: npm test

- name: Publish to coveralls ⭐
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"rimraf": "^3.0.2",
"ts-jest": "^26.4.4",
"tslint": "^6.1.0",
"typedoc": "^0.20.18",
"typedoc": "^0.20.19",
"typescript": "^4.1.3",
"whatwg-fetch": "^3.5.0"
},
Expand Down

0 comments on commit e168182

Please sign in to comment.