diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..b339b63c7 --- /dev/null +++ b/.github/dependabot.yml @@ -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' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..ad791c3e2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml new file mode 100644 index 000000000..fa9989681 --- /dev/null +++ b/.github/workflows/close-stale.yml @@ -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' diff --git a/.gitignore b/.gitignore index 26f8ef1ce..62ffed445 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ examples/express/express-example # Example dependencies examples/express/node_modules + +# Editors +.vscode/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 22520a869..000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: - - node_js -node_js: 14 -services: - - mongodb -sudo: true -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - - sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-4.8 g++-4.8 - - sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install libavahi-compat-libdnssd-dev # npm install mdns - - export CXX="g++-4.8" CC="gcc-4.8" -git: - depth: 1 diff --git a/README.md b/README.md index 0a214cc95..7ec001206 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/package.json b/package.json index 03913d957..77aec9c62 100644 --- a/package.json +++ b/package.json @@ -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": {