Skip to content

Commit

Permalink
Merge pull request #658 from serverless-heaven/github-actions
Browse files Browse the repository at this point in the history
Ditch Travis to use GitHub Actions
  • Loading branch information
miguel-a-calles-mba authored Jan 21, 2021
2 parents ba015d8 + 7c70b18 commit 3369e9f
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 65 deletions.
18 changes: 0 additions & 18 deletions .appveyor.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linter

on:
pull_request:
branches:
- master
- release/*
push:
branches:
- master
- release/*

jobs:
eslint:
runs-on: ubuntu-latest
name: ESLint

steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: "Install Node.js"
uses: actions/setup-node@v1
with:
node-version: "12"

- name: "Install dependencies"
run: npm ci

- name: "Lint files"
run: "npm run eslint"
20 changes: 1 addition & 19 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package
name: Publish new release on NPM

on:
release:
Expand Down Expand Up @@ -31,18 +28,3 @@ jobs:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

# Disable GPR
# publish-gpr:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# registry-url: https://npm.pkg.github.com/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
73 changes: 73 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Tests

on:
pull_request:
branches:
- master
- release/*
push:
branches:
- master
- release/*

jobs:
mocha:
runs-on: ${{ matrix.os }}
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}

strategy:
matrix:
os:
- windows-latest
- ubuntu-18.04
node:
- "10"
- "12"

steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 2

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

- name: "Install dependencies"
run: npm ci

- name: "Run tests"
run: "npm run test"

- name: "Run tests"
run: "npm run test"

coverage:
name: "Upload coverage"
runs-on: ubuntu-latest
needs:
- "mocha"

steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: "Install Node.js"
uses: actions/setup-node@v1
with:
node-version: "12"

- name: "Install dependencies"
run: npm ci

- name: "Run tests"
run: "npm run test-coverage"

- name: "Upload to Coveralls"
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 3369e9f

Please sign in to comment.