Skip to content

Commit

Permalink
Merge pull request #376 from sealink/TT-8851-migrate-to-gh-actions
Browse files Browse the repository at this point in the history
Tt 8851 migrate to gh actions
  • Loading branch information
jmortlock authored Feb 11, 2021
2 parents 607935b + 7c483b8 commit 766e1fe
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 31 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
23 changes: 23 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
node: [ '10', '12', '14' ]
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run test
- run: npm run coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release
on:
push:
tags:
- "*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14.x'
- run: npm ci
- run: npm run test

release:
needs: build
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Generate Changelog
run: |
# Get version from github ref (remove 'refs/tags/' and prefix 'v')
version="${GITHUB_REF#refs/tags/v}"
npx changelog-parser CHANGELOG.md | jq -cr ".versions | .[] | select(.version == \"$version\") | .body" > ${{ github.workflow }}-CHANGELOG.txt
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workflow }}-CHANGELOG.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
needs: [build, release]
name: Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* [TT-8847] - Convert non-array input issuedTicketIds in quicktravelApi to be array
* [TT-8837] - Allow http 204 response code to be parsed.
* [TT-8852] - Migrate to github actions

## 1.8.0

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![npm version](https://badge.fury.io/js/%40sealink%2Fprinters_qt.svg)](https://badge.fury.io/js/%40sealink%2Fprinters_qt)
[![Coverage Status](https://coveralls.io/repos/github/sealink/printers_qt/badge.svg?branch=master)](https://coveralls.io/github/sealink/printers_qt?branch=master)
[![Build Status](https://travis-ci.org/sealink/printers_qt.svg?branch=master)](https://travis-ci.org/sealink/printers_qt)

[![Build Status](https://github.com/sealink/printers_qt/workflows/Build%20and%20Test/badge.svg?branch=master)](https://github.com/sealink/printers_qt/actions)
### Why

Provides a wrapper api which hides the underlying printing services in QuickTravel.
Expand Down
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"watch": "rollup -c -w",
"pretest": "rollup -c",
"test": "nyc mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"coverage": "nyc report --reporter=lcov",
"prepublish": "BUILD=production npm test"
},
"lint-staged": {
Expand Down Expand Up @@ -65,6 +65,6 @@
}
},
"engines": {
"node": "^10 || ^12"
"node": "^10 || ^12 || ^14"
}
}

0 comments on commit 766e1fe

Please sign in to comment.