Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
chore: add ci, stale workflows and dependabot (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Mar 24, 2021
1 parent 9598890 commit 31e8bf7
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 16 deletions.
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: 'weekly'
allow:
- dependency-type: 'production'
labels:
- 'prod-dependencies'

- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
target-branch: master
allow:
- dependency-type: 'development'
labels:
- 'dev-dependencies'
- 'automerge'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
test:

strategy:
fail-fast: false # prevent test to stop if one fails
matrix:
node-version: [10.x, 12.x, 14.x]
os: [ubuntu-latest] # Skip macos-latest, windows-latest for now

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.pkg-cache/
key: ${{ matrix.os }}-${{ matrix.node-version }}

- name: Install deps
run: yarn install

- name: Lint
if: matrix['node-version'] == '14.x' && matrix['os'] == 'ubuntu-latest'
run: yarn run lint

- name: Build
run: yarn run babel

- name: Test
run: yarn run test
20 changes: 20 additions & 0 deletions .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Close stale issues'
on:
schedule:
- cron: '0 0 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label'
close-issue-message: 'This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.'
stale-pr-message: 'This pull-request is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this pull-request entirely you can add the no-stale label'
close-pr-message: 'This pull-request is now closed due to inactivity, you can of course reopen or reference this pull-request if you see fit.'
days-before-stale: 90
days-before-close: 5
exempt-issue-labels: 'no-stale,enhancement'
exempt-pr-labels: 'no-stale'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ examples/express/express-example

# Example dependencies
examples/express/node_modules

# Editors
.vscode/
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![](https://res.cloudinary.com/zeit-inc/image/upload/v1509936789/repositories/pkg/pkg-repo-banner-new.png)

[![Build Status](https://travis-ci.org/vercel/pkg.svg?branch=master)](https://travis-ci.org/vercel/pkg)
[![Build Status](https://github.com/vercel/pkg/actions/workflows/ci.yml/badge.svg)](https://github.com/vercel/pkg/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/vercel/pkg/badge.svg?branch=master)](https://coveralls.io/github/vercel/pkg?branch=master)
[![Dependency Status](https://david-dm.org/vercel/pkg/status.svg)](https://david-dm.org/vercel/pkg)
[![devDependency Status](https://david-dm.org/vercel/pkg/dev-status.svg)](https://david-dm.org/vercel/pkg?type=dev)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"lint": "eslint-klopov . || true",
"prepare": "npm run babel",
"prepublishOnly": "eslint-klopov . && npm run test:no-npm",
"test": "eslint-klopov . && npm run babel && node test/test.js node14 no-npm && node test/test.js node12 no-npm && node test/test.js node10 no-npm && node test/test.js host only-npm",
"test": "npm run babel && node test/test.js node14 no-npm && node test/test.js node12 no-npm && node test/test.js node10 no-npm && node test/test.js host only-npm",
"test:no-npm": "node test/test.js host no-npm"
},
"eslintConfig": {
Expand Down

0 comments on commit 31e8bf7

Please sign in to comment.