From f7233fe185a12393d1b8419b37c5a6c07e588a08 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 7 Apr 2022 13:35:29 -0700 Subject: [PATCH] ci: restore CI testing to working order --- .codeclimate.yml | 2 +- .github/ISSUE_TEMPLATE.md | 11 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 11 ++++++++++ .github/workflows/ci-test.yml | 29 +++++++++++++++++++++++++ .github/workflows/coveralls.yml | 32 +++++++++++++++++++++++++++ .github/workflows/lint.yml | 26 ++++++++++++++++++++++ .github/workflows/publish.yml | 37 ++++++++++++++++++++++++++++++++ .travis.yml | 2 -- Changes.md | 6 ++++++ README.md | 4 ---- appveyor.yml | 2 +- 11 files changed, 154 insertions(+), 8 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/ci-test.yml create mode 100644 .github/workflows/coveralls.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/publish.yml diff --git a/.codeclimate.yml b/.codeclimate.yml index bc279b5..ae502d1 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,7 +1,7 @@ engines: eslint: enabled: true - channel: "eslint-4" + channel: "eslint-8" config: config: ".eslintrc.yaml" diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..0dccc85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +### system info + +Please report your OS, Node version, and Haraka version by running this shell script on your Haraka server and replacing this section with the output. + +echo "Haraka | $(haraka -v)"; echo " --- | :--- "; echo "Node | $(node -v)"; echo "OS | $(uname -a)"; echo "openssl | $(openssl version)" + +### Expected behavior + +### Observed behavior + +### Steps to reproduce diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..afafec5 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +Fixes # + +Changes proposed in this pull request: +- +- + +Checklist: +- [ ] docs updated +- [ ] tests updated +- [ ] Changes.md updated +- [ ] package.json.version bumped diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000..48a2958 --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,29 @@ +name: Tests + +on: [ push ] + +env: + CI: true + +jobs: + + ci-test: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest, windows-latest ] + node-version: [ 12, 14, 16 ] + 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/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000..ef76188 --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,32 @@ +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: 14 + + - 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 new file mode 100644 index 0000000..9ba49cf --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: Lint + +on: [ push ] + +env: + CI: true + +jobs: + + lint: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [ 14 ] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + name: Node.js ${{ matrix.node-version }} + with: + node-version: ${{ matrix.node-version }} + + - run: npm install + - run: npm run lint diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..35fac2d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,37 @@ +name: Publish + +on: + release: + types: [ published ] + +env: + node_version: 14 + +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 }} + diff --git a/.travis.yml b/.travis.yml index 47519b5..a6f1367 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: node_js node_js: - - "10" - - "12" - "14" services: diff --git a/Changes.md b/Changes.md index 25ba43d..6b1fbe1 100644 --- a/Changes.md +++ b/Changes.md @@ -1,4 +1,10 @@ +## 1.0.4 - 2022-04-07 + +- ci: restore to working order +- + + ## 1.0.3 - 2018-11-20 - Fix data hook #12 diff --git a/README.md b/README.md index 100ac11..cc97a80 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ [![Build Status][ci-img]][ci-url] [![Code Climate][clim-img]][clim-url] -[![Greenkeeper badge][gk-img]][gk-url] [![Windows Build Status][ci-win-img]][ci-win-url] [![NPM][npm-img]][npm-url] - # haraka-plugin-fcrdns @@ -149,7 +147,5 @@ The iprev results are added to the Authentication-Results header. [cov-url]: https://codecov.io/github/haraka/haraka-plugin-fcrdns [clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-fcrdns/badges/gpa.svg [clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-fcrdns -[gk-img]: https://badges.greenkeeper.io/haraka/haraka-plugin-fcrdns.svg -[gk-url]: https://greenkeeper.io/ [npm-img]: https://nodei.co/npm/haraka-plugin-fcrdns.png [npm-url]: https://www.npmjs.com/package/haraka-plugin-fcrdns diff --git a/appveyor.yml b/appveyor.yml index a34c42b..23e656b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ environment: - nodejs_version: "10" + nodejs_version: "14" install: - ps: Install-Product node $env:nodejs_version