Skip to content

Commit

Permalink
Merge pull request #17 from haraka/ci-update
Browse files Browse the repository at this point in the history
ci: replace travis & appveyor with github actions
  • Loading branch information
msimerson authored May 18, 2022
2 parents 27c4a68 + 5d0d460 commit 745362c
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 43 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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
32 changes: 32 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -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: 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 }}
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish

on:
release:
types: [ published ]

env:
node_version: 16

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
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@


- ci: add node 18 testing
- ci: replace travis & appveyor with github actions


### 1.0.3 - 2020-01-17

- Use es6 classes on full - static members instead of old style `exports.stuff`
Expand Down
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.3",
"description": "Haraka DSN",
"engines": {
"node": ">= v10.18.1"
"node": ">= v14.0.0"
},
"main": "index.js",
"scripts": {
Expand All @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/haraka/haraka-dsn#readme",
"devDependencies": {
"eslint": ">=4",
"eslint": ">=6",
"eslint-plugin-haraka": "*",
"haraka-constants": "*",
"mocha": "*"
Expand Down

0 comments on commit 745362c

Please sign in to comment.