Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
fix: migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Woodward committed Jul 1, 2021
1 parent a8ee554 commit 9cb5378
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 31 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,94 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
install:
name: Install
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm i


validate:
name: Validate - Node v${{ matrix.node }}
runs-on: ubuntu-18.04
needs: install
strategy:
matrix:
node: [ 10, 11, 12, 14 ]

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run Tests
run: npm run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
runs-on: ubuntu-18.04
needs: [validate]
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
# Release the Codes!!
- name: Release!
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx remove-lockfiles
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

13 changes: 3 additions & 10 deletions README.md
Expand Up @@ -2,11 +2,10 @@

[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Travis][travis-ci-image]][travis-ci-url]
[![CI Build][github-actions-image]][github-actions-url]
[![Coveralls][coveralls-image]][coveralls-url]

[![semantic-release][semantic-release-image]][semantic-release-url]
[![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]

An opinionated wrapper for AWS Lambda that enables the use of Promises.

Expand Down Expand Up @@ -44,17 +43,11 @@ exports.handler = wrapper((event, context) => {
[npm-downloads-image]: https://img.shields.io/npm/dm/@salte-io/salte-lambda.svg?style=flat
[npm-url]: https://npmjs.org/package/@salte-io/salte-lambda

[travis-ci-image]: https://img.shields.io/travis/com/salte-io/salte-lambda/master.svg?style=flat
[travis-ci-url]: https://travis-ci.com/salte-io/salte-lambda
[github-actions-image]: https://github.com/salte-io/salte-lambda/actions/workflows/ci.yml/badge.svg?branch=master
[github-actions-url]: https://github.com/salte-io/salte-lambda/actions/workflows/ci.yml

[coveralls-image]: https://img.shields.io/coveralls/salte-io/salte-lambda/master.svg
[coveralls-url]: https://coveralls.io/github/salte-io/salte-lambda?branch=master

[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]: https://commitizen.github.io/cz-cli/

[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg

[greenkeeper-image]: https://badges.greenkeeper.io/salte-io/salte-lambda.svg
[greenkeeper-url]: https://greenkeeper.io
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -9,7 +9,7 @@
"homepage": "https://github.com/salte-io/salte-lambda",
"bugs": "https://github.com/salte-io/salte-lambda/issues",
"contributors": [
"Ceci Woodward <ceci@salte.io>",
"Cecilia Woodward <ceci@salte.io>",
"Dave Woodward <dave@salte.io>"
],
"keywords": [
Expand All @@ -27,7 +27,8 @@
"test": "nyc ava",
"test:tdd": "ava -w",
"report-coverage": "coveralls < coverage/lcov.info",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release",
"prepare": "husky install"
},
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 9cb5378

Please sign in to comment.