Skip to content

Commit

Permalink
ci: replace travis & appveyor with github (#29)
Browse files Browse the repository at this point in the history
* use npx in package.json
  • Loading branch information
msimerson authored Aug 25, 2021
1 parent 5b11299 commit 7dc6fbb
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 42 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### system info

Please report your Node.js 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)";

### Expected behavior

### Observed behavior

### Steps to reproduce
32 changes: 32 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on: [ push ]

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@v2
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
with:
node-version: ${{ matrix.node-version }}

- run: npm install
- run: npm test
env:
CI: true
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@v2
with:
node-version: '12'

- 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 }}
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint

on: [ push ]

jobs:

lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- '12'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
name: Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- run: npm install
- run: npm run lint
env:
CI: true
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "display log entries from haraka log files via HTTP",
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/mocha",
"lint": "./node_modules/.bin/eslint *.js test",
"lintfix": "./node_modules/.bin/eslint --fix *.js test",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha"
"test": "npx mocha",
"lint": "npx eslint *.js test",
"lintfix": "npx eslint --fix *.js test",
"cover": "npx istanbul cover npx mocha"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7dc6fbb

Please sign in to comment.