diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml deleted file mode 100644 index ba1d115..0000000 --- a/.github/workflows/ci-test.yml +++ /dev/null @@ -1,35 +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.x, 16.x ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - name: Checkout Module - with: - fetch-depth: 1 - - - uses: actions/setup-node@v2 - name: Node ${{ matrix.node-version }} on ${{ matrix.os }} - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - - name: Run test suite - run: npm run test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d768329 --- /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 940f9fd..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@v2 - 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 deleted file mode 100644 index 4fcf698..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,33 +0,0 @@ - -name: Lint - -on: [ push ] - -env: - CI: true - -jobs: - - lint: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [ 14 ] - - steps: - - uses: actions/checkout@v2 - name: Checkout Module - with: - fetch-depth: 1 - - - uses: actions/setup-node@v2 - name: Use Node.js ${{ matrix.node-version }} - with: - node-version: ${{ matrix.node-version }} - - - run: npm install - - - name: Lint - run: npm run lint diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml deleted file mode 100644 index 411518e..0000000 --- a/.github/workflows/master.yml +++ /dev/null @@ -1,52 +0,0 @@ - -name: publish - -on: - push: - branches: - - master - -env: - CI: true - node_version: 14 - -jobs: - - publish-npm: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup node.js ${{ env.node_version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ env.node_version }} - registry-url: https://registry.npmjs.org/ - - - run: npm install - - - name: Run tests - run: npm run test - - - name: publish to NPM - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - name: GitHub Release - uses: justincy/github-action-npm-release@2.0.1 - id: release - - - name: Coverage Run - run: | - npm install --no-save nyc codecov - npx nyc --reporter=lcovonly npm run test - - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..42a9bb9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,14 @@ +name: publish + +on: + push: + branches: + - master + +env: + CI: true + +jobs: + publish: + uses: haraka/.github/.github/workflows/publish.yml@master + secrets: inherit \ No newline at end of file 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 e47b102..868027f 100644 --- a/Changes.md +++ b/Changes.md @@ -1,55 +1,76 @@ -## 1.0.11 - 2022-03-31 +### Unreleased + + +### [1.0.12] - 2022-06-05 + +- ci: update GHA workflow with shared +- ci: add submodule .release + + +### 1.0.11 - 2022-03-31 - node 12 EOL, drop testing. -## 1.0.10 - 2019-03-22 +### 1.0.10 - 2019-03-22 * Add an 'if' to "blocked message" HTML header * CI testing updates (node.js versions) * moved config/karma.ini to test/config/karma.ini -## 1.0.9 - 2017-08-17 + +### 1.0.9 - 2017-08-17 * also prune syslog hostname when no PID in entry -## 1.0.8 - 2017-06-16 + +### 1.0.8 - 2017-06-16 * depend on haraka-eslint for rules * lint fixes -## 1.0.7 - 2017-05-04 + +### 1.0.7 - 2017-05-04 * add --text flag to grep call, in case log file has binary chars -## 1.0.6 - 2017-01-23 + +### 1.0.6 - 2017-01-23 * remove host & pid detail from syslog lines -## 1.0.5 - 2016-11-04 + +### 1.0.5 - 2016-11-04 * display log entries for transactions * display just transaction ID in place of full UUID.id * refactored most of get logs into grepWithShell & asHtml * with test coverage for the latter two -## 1.0.4 - 2016-10-25 + +### 1.0.4 - 2016-10-25 * remove useless $UUID token from display -## Oct 2 12:57:42 2016 + +### Oct 2 12:57:42 2016 * trim uuids more reliably (#4) -## Oct 2 12:08:44 2016 + +### Oct 2 12:08:44 2016 * Duplicate resolutions (#2) * suppress duplicate actions -## Sep 29 23:10:33 2016 + +### Sep 29 23:10:33 2016 * add missing eslint definition * added README * add .travis.yml * initial commit + + +[1.0.12]: https://github.com/haraka/haraka-plugin-log-reader/releases/tag/1.0.12 diff --git a/package.json b/package.json index ebfd010..a138392 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "haraka-plugin-log-reader", - "version": "1.0.11", + "version": "1.0.12", "description": "display log entries from haraka log files via HTTP", "main": "index.js", "scripts": {