Skip to content

Commit

Permalink
Merge pull request #114 from mntnr/gh-actions
Browse files Browse the repository at this point in the history
ci(workflows): added GH Actions and removed TravisCI/Greenkeeper
  • Loading branch information
Berkmann18 committed Jul 15, 2023
2 parents 0dd24f9 + 71d30a4 commit 793d889
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 33 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/dependabot.yml
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
target-branch: master
# reviewers:
# - Berkmann18
# - RichardLitt
labels:
- dependencies
30 changes: 30 additions & 0 deletions .github/workflows/nodejs.yml
@@ -0,0 +1,30 @@
name: Node.js CI

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: ['lts/*', 'node']

steps:
- uses: actions/checkout@v2
- name: Set up Node ${{ matrix.node-version }} using nvm
uses: dcodeIO/setup-node-nvm@master
with:
node-version: ${{ matrix.node-version }}
- run: npm prune
- run: |
npm ci
npm run lint
- run: npm t
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/semantic-release.yml
@@ -0,0 +1,22 @@
name: Semantic Release

on:
push:
branches: [ master ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '20.x'
- run: npm ci
- name: Semantic Release
uses: codfish/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions readme.md
@@ -1,8 +1,7 @@
# name-your-contributors

[![Greenkeeper badge](https://badges.greenkeeper.io/mntnr/name-your-contributors.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/name-your-contributors.svg)](https://badge.fury.io/js/name-your-contributors)
[![Build Status](https://travis-ci.org/mntnr/name-your-contributors.svg?branch=master)](https://travis-ci.org/mntnr/name-your-contributors)
[![Build and Deploy](https://github.com/mntnr/name-your-contributors/actions/workflows/nodejs.yml/badge.svg)](https://github.com/mntnr/name-your-contributors/actions/workflows/nodejs.yml)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

> Name your GitHub contributors; get commits, issues, and comments
Expand Down
4 changes: 2 additions & 2 deletions test/integration-test.js
Expand Up @@ -34,7 +34,7 @@ const contribPre = {

test('No contributions in a single second', t => {
return main.repoContributors({
token: token,
token,
user: 'mntnr',
repo: 'name-your-contributors',
after: new Date('2016-01-01T15:21:08.104Z'),
Expand Down Expand Up @@ -62,7 +62,7 @@ const compareKeys = (x, k) =>
// be flexible.
test('Contributors before a fixed date remain static', t => {
return main.repoContributors({
token: token,
token,
user: 'mntnr',
repo: 'name-your-contributors',
before: new Date('2017-09-21'),
Expand Down

0 comments on commit 793d889

Please sign in to comment.