From af40a7728351962cfc65173382baba7e9f14d2d5 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sun, 5 Jun 2022 17:42:55 -0700 Subject: [PATCH] Release v1.0.3 (#18) - ci: update with shared GHA workflows - ci: add node 18 testing - ci: replace travis & appveyor with github actions --- .github/dependabot.yml | 10 +++++++ .github/workflows/ci-test.yml | 28 ------------------ .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++ .github/workflows/codeql.yml | 13 +++++++++ .github/workflows/coveralls.yml | 32 --------------------- .github/workflows/lint.yml | 23 --------------- .github/workflows/publish.yml | 51 ++++++--------------------------- .gitignore | 3 +- .gitmodules | 3 ++ .release | 1 + Changes.md | 4 +++ README.md | 10 ++----- package.json | 9 +++--- 13 files changed, 88 insertions(+), 140 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/ci-test.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/coveralls.yml delete mode 100644 .github/workflows/lint.yml create mode 100644 .gitmodules create mode 160000 .release diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0449e4a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + allow: + - dependency-type: production diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml deleted file mode 100644 index a38072c..0000000 --- a/.github/workflows/ci-test.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Tests - -on: [ push ] - -env: - CI: true - -jobs: - - ci-test: - - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest, windows-latest ] - node-version: [ 14, 16, 18 ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - name: Node ${{ matrix.node-version }} on ${{ matrix.os }} - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - run: npm test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..452832a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: [ push ] + +env: + CI: true + +jobs: + + lint: + uses: haraka/.github/.github/workflows/lint.yml@master + + coverage: + uses: haraka/.github/.github/workflows/coverage.yml@master + secrets: inherit + + test: + needs: [ lint, get-lts ] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + node-version: ${{ fromJson(needs.get-lts.outputs.active) }} + fail-fast: false + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + name: Node ${{ matrix.node-version }} on ${{ matrix.os }} + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test + + get-lts: + runs-on: ubuntu-latest + steps: + - id: get + uses: msimerson/node-lts-versions@v1 + outputs: + active: ${{ steps.get.outputs.active }} + lts: ${{ steps.get.outputs.lts }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..383aca2 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,13 @@ +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: '18 7 * * 4' + +jobs: + codeql: + uses: haraka/.github/.github/workflows/codeql.yml@master diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml deleted file mode 100644 index b97cbd8..0000000 --- a/.github/workflows/coveralls.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Test Coverage - -# on: [ push ] # use this for non-plugins -# haraka-plugin-*, dummy event that never triggers -on: [ milestone ] - -jobs: - - coverage: - - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install - run: | - npm install - npm install --no-save nyc codecov - - - run: npx nyc --reporter=lcovonly npm test - env: - NODE_ENV: cov - - - name: Submit to Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4c04735..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Lint - -on: [ push ] - -env: - CI: true - node_version: 16 - -jobs: - - lint: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - name: Node.js ${{ env.node_version }} - with: - node-version: ${{ env.node_version }} - - - run: npm install - - run: npm run lint diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d0e575..42a9bb9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,49 +1,14 @@ -name: Publish +name: publish on: - release: - types: [ published ] + push: + branches: + - master env: - node_version: 16 + CI: true jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - with: - node-version: ${{ env.node_version }} - - run: npm install - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v3 - with: - node-version: ${{ env.node_version }} - registry-url: https://registry.npmjs.org - - run: npm install - - - run: npm publish --ignore-scripts --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - uses: actions/setup-node@v2 - with: - node-version: ${{ env.node_version }} - registry-url: https://registry.npmjs.org - - run: npm install + publish: + uses: haraka/.github/.github/workflows/publish.yml@master + secrets: inherit \ No newline at end of file diff --git a/.gitignore b/.gitignore index eba3cc2..924a4ab 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,5 @@ jspm_packages # Optional REPL history .node_repl_history -package-lock.json \ No newline at end of file +package-lock.json +haraka-update.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a8e94cb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".release"] + path = .release + url = git@github.com:msimerson/.release.git diff --git a/.release b/.release new file mode 160000 index 0000000..9be2b27 --- /dev/null +++ b/.release @@ -0,0 +1 @@ +Subproject commit 9be2b270ef836bcfefda085674bf62e2a91defe8 diff --git a/Changes.md b/Changes.md index a163ab6..2baea60 100644 --- a/Changes.md +++ b/Changes.md @@ -1,5 +1,9 @@ +### Unreleased +### 1.0.4 - 2022-06-05 + +- ci: update with shared GHA workflows - ci: add node 18 testing - ci: replace travis & appveyor with github actions diff --git a/README.md b/README.md index b05ba0e..c999362 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ [![Build Status][ci-img]][ci-url] -[![Windows Build Status][ci-win-img]][ci-win-url] -[![Greenkeeper badge][gk-img]][gk-url] [![Code Climate][clim-img]][clim-url] [![Code Coverage][cov-img]][cov-url] [![NPM][npm-img]][npm-url] @@ -412,15 +410,11 @@ The function name is required and maps to the list of defined status codes in RF -[ci-img]: https://travis-ci.org/haraka/haraka-dsn.svg -[ci-url]: https://travis-ci.org/haraka/haraka-dsn -[ci-win-img]: https://ci.appveyor.com/api/projects/status/jl1acy5j9x277b79?svg=true -[ci-win-url]: https://ci.appveyor.com/project/msimerson/haraka-dsn +[ci-img]: https://github.com/haraka/haraka-dsn/actions/workflows/ci.yml/badge.svg +[ci-url]: https://github.com/haraka/haraka-dsn/actions/workflows/ci.yml [cov-img]: https://codecov.io/github/haraka/haraka-dsn/coverage.svg [cov-url]: https://codecov.io/github/haraka/haraka-dsn [clim-img]: https://codeclimate.com/github/haraka/haraka-dsn/badges/gpa.svg [clim-url]: https://codeclimate.com/github/haraka/haraka-dsn -[gk-img]: https://badges.greenkeeper.io/haraka/haraka-dsn.svg -[gk-url]: https://greenkeeper.io/ [npm-img]: https://nodei.co/npm/haraka-dsn.png [npm-url]: https://www.npmjs.com/package/haraka-dsn diff --git a/package.json b/package.json index 748f4d6..02bfda3 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,8 @@ }, "main": "index.js", "scripts": { - "lint": "npx eslint *.js test/*.js", - "lintfix": "npx --fix *.js test/*.js", - "cover": "npx nyc --reporter=lcov npm run test", + "lint": "npx eslint *.js test", + "lintfix": "npx --fix *.js test", "test": "npx mocha" }, "repository": { @@ -27,10 +26,10 @@ }, "homepage": "https://github.com/haraka/haraka-dsn#readme", "devDependencies": { - "eslint": ">=6", + "eslint": ">=8", "eslint-plugin-haraka": "*", "haraka-constants": "*", - "mocha": "*" + "mocha": ">=9" }, "dependencies": { }