Skip to content

Commit

Permalink
chore: changing build/ci from travis to github, npm instead of yarn, …
Browse files Browse the repository at this point in the history
…etc. (#85)

* chore: changing build/ci from travis to github, npm instead of yarn, main instead of master, and dependabot config updates
* chore: fix coverage publishing for github actions build; sync with master
  • Loading branch information
activescott committed Jun 12, 2021
1 parent 1c7b77f commit 89207ea
Show file tree
Hide file tree
Showing 14 changed files with 13,166 additions and 14,065 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The following is a set of guidelines for contributing to this project. These are

## How Can I Contribute?

Feel free to check [issues page](https://github.com/activescott/serverless-http-invoker/issues) to find an enhancement to implement or bug to fix. You could also **[Improve the documentation](https://github.com/activescott/serverless-http-invoker/edit/master/README.md)**, **Report a Bug**, or **Suggest an Enhancement**.
Feel free to check [issues page](https://github.com/activescott/serverless-http-invoker/issues) to find an enhancement to implement or bug to fix. You could also **[Improve the documentation](https://github.com/activescott/serverless-http-invoker/edit/main/README.md)**, **Report a Bug**, or **Suggest an Enhancement**.

### Contribute Code

- Fork this repository and [submit a pull request](https://help.github.com/articles/creating-a-pull-request/).
- Write tests
- Ensure the linter passes with `yarn lint` or `npm run lint`
- Ensure the linter passes with `npm run lint`
- Ensure the tests pass at [the CI Server](https://travis-ci.org/activescott/serverless-http-invoker) by [following the status](https://help.github.com/articles/about-statuses/) of your pull request.
6 changes: 4 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# docs v2 https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# docs v2 https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
- package-ecosystem: "npm"
schedule:
interval: "weekly"
interval: "monthly"
# Check for npm updates on Sundays
day: "saturday"
allow:
- dependency-type: "production"
directory: "/"
commit-message:
# for production deps, prefix commit messages with "fix" (trigger a patch release)
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: build

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1
- name: "Use Node.js (deliberately not using matrix)"
uses: actions/setup-node@v1
with:
node-version: v12.x

- name: install dependencies
run: |
npm i
- name: lint
run: |
npm run lint
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
node: [10, 12, 14]

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

- name: install dependencies
run: |
npm i
- name: test
env:
CI_NODE_VERSION: ${{ matrix.node }}
run: |
npm run test
- name: publish coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: nodejs-${{ matrix.node }}
parallel: true

finish_tests:
needs: build_and_test
runs-on: ubuntu-20.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

deploy_package:
needs: finish_tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1

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

#- name: debug deploy_package
# uses: actions/bin/debug@master

- name: deploy via semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm i semantic-release@17
./node_modules/.bin/semantic-release
19 changes: 19 additions & 0 deletions .github/workflows/dependabot-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: dependabot validate

on:
pull_request:
paths:
- ".github/dependabot.yml"
- ".github/workflows/dependabot-validate.yml"
jobs:
validate:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: marocchino/validate-dependabot@v1
id: validate
- uses: marocchino/sticky-pull-request-comment@v2
if: always()
with:
header: validate-dependabot
message: ${{ steps.validate.outputs.markdown }}
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
Expand Down Expand Up @@ -51,9 +49,6 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

4 changes: 3 additions & 1 deletion .nycrc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
reporter: html
reporter:
- lcov
- html
check-coverage: true
branches: 90
lines: 90
Expand Down
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[![npm version](https://badge.fury.io/js/serverless-http-invoker.svg)](https://www.npmjs.com/package/serverless-http-invoker)
[![npm downloads](https://img.shields.io/npm/dt/serverless-http-invoker.svg?logo=npm)](https://www.npmjs.com/package/serverless-http-invoker)
[![Build Status](https://travis-ci.org/activescott/serverless-http-invoker.svg?branch=master)](https://travis-ci.org/activescott/serverless-http-invoker)
[![Build Status](https://github.com/activescott/serverless-http-invoker/workflows/build/badge.svg)](https://github.com/activescott/serverless-http-invoker/actions)
[![Coverage Status](https://coveralls.io/repos/github/activescott/serverless-http-invoker/badge.svg)](https://coveralls.io/github/activescott/serverless-http-invoker)
[![License](https://img.shields.io/github/license/activescott/serverless-http-invoker.svg)](https://github.com/activescott/serverless-http-invoker/blob/master/LICENSE)
[![License](https://img.shields.io/github/license/activescott/serverless-http-invoker.svg)](https://github.com/activescott/serverless-http-invoker/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/activescott/serverless-http-invoker.svg?style=social)](https://github.com/activescott/serverless-http-invoker)

# serverless-http-invoker
Expand Down Expand Up @@ -57,7 +57,7 @@ If you are new to the Serverless Framework, check out the [Serverless Framework

## Install

yarn (`yarn add serverless-http-invoker --dev`) or npm (`npm install serverless-http-invoker --save-dev`)
npm (`npm install serverless-http-invoker --save-dev`) or yarn (`yarn add serverless-http-invoker --dev`)

## Features

Expand All @@ -79,7 +79,7 @@ We use [semantic-release](https://github.com/semantic-release/semantic-release)

| branch | npm distribution tag |
| ------ | -------------------- |
| master | latest |
| main | latest |
| beta | beta |

To trigger a release use a Conventional Commit following [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) on one of the above branches.
Expand Down
Loading

0 comments on commit 89207ea

Please sign in to comment.