From e8feecb15c59d34f8a25ce7bb23b2b85217d3f59 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sun, 14 Jun 2020 20:50:00 +0900 Subject: [PATCH 1/2] Add ci and dependency update workflows --- .github/CODEOWNERS | 1 - .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ .github/workflows/update-dep.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 13 ------------- renovate.json | 5 ----- 5 files changed, 55 insertions(+), 19 deletions(-) delete mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/update-dep.yml delete mode 100644 .travis.yml delete mode 100644 renovate.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 50a2c6b..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @peter-evans \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e8fe400 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI +on: + push: + branches: [master] + paths-ignore: + - 'README.md' + - 'docs/**' + pull_request: + branches: [master] + paths-ignore: + - 'README.md' + - 'docs/**' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12.x + - run: npm ci + - run: npm run test + - run: npm run mutate + - run: npm run coverage diff --git a/.github/workflows/update-dep.yml b/.github/workflows/update-dep.yml new file mode 100644 index 0000000..dacbde2 --- /dev/null +++ b/.github/workflows/update-dep.yml @@ -0,0 +1,31 @@ +name: Update Dependencies +on: + schedule: + - cron: '0 1 * * 4' +jobs: + update-dep: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Update dependencies + run: | + npx -p npm-check-updates ncu -u + npm install + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + token: ${{ secrets.ACTIONS_BOT_TOKEN }} + commit-message: Update dependencies + committer: GitHub + author: actions-bot + title: Update dependencies + body: | + - Dependency updates + + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + branch: update-dependencies diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 384a775..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js - -node_js: - - stable - -install: - - npm install - -script: - - npm run test - - npm run mutate - -after_success: npm run coverage diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f45d8f1..0000000 --- a/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "config:base" - ] -} From 079dae604d47d0fae3fe5458db49f8eba5b84131 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Sun, 14 Jun 2020 21:14:07 +0900 Subject: [PATCH 2/2] Fix coverage --- .github/workflows/ci.yml | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8fe400..e1f5ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,3 +22,6 @@ jobs: - run: npm run test - run: npm run mutate - run: npm run coverage + - uses: coverallsapp/github-action@v1.1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index d6aed67..0310a6b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "nyc mocha --reporter nyan", "mutate": "./node_modules/.bin/stryker run", - "coverage": "nyc report --reporter=text-lcov | coveralls" + "coverage": "nyc report --reporter=lcov" }, "repository": { "type": "git",