- Build: Add Github workflows
- Docs: Indicate current coverage on README
This commit is contained in:
16
.github/workflows/coverage.yml
vendored
Normal file
16
.github/workflows/coverage.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Coverage
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Coverage
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run test-cov
|
||||||
|
exit 0
|
||||||
26
.github/workflows/nodejs.yml
vendored
Normal file
26
.github/workflows/nodejs.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Node CI
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [10.x, 12.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: npm install, build, and test
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build --if-present
|
||||||
|
npm test
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
45
.github/workflows/npmpublish.yml
vendored
Normal file
45
.github/workflows/npmpublish.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Node.js Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm test
|
||||||
|
|
||||||
|
publish-npm:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
registry-url: https://registry.npmjs.org/
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||||
|
|
||||||
|
publish-gpr:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
registry-url: https://npm.pkg.github.com/
|
||||||
|
scope: '@brettz9'
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
[](https://david-dm.org/SVG-Edit/svgedit)
|
[](https://david-dm.org/SVG-Edit/svgedit)
|
||||||
[](https://david-dm.org/SVG-Edit/svgedit?type=dev)
|
[](https://david-dm.org/SVG-Edit/svgedit?type=dev)
|
||||||
|
|
||||||
|
<!-- [](https://github.com/SVG-Edit/svgedit/actions) -->
|
||||||
|
[](https://github.com/SVG-Edit/svgedit/actions)
|
||||||
|
|
||||||
[](https://snyk.io/test/github/SVG-Edit/svgedit)
|
[](https://snyk.io/test/github/SVG-Edit/svgedit)
|
||||||
[](https://lgtm.com/projects/g/SVG-Edit/svgedit/alerts)
|
[](https://lgtm.com/projects/g/SVG-Edit/svgedit/alerts)
|
||||||
[](https://lgtm.com/projects/g/SVG-Edit/svgedit/context:javascript)
|
[](https://lgtm.com/projects/g/SVG-Edit/svgedit/context:javascript)
|
||||||
|
|||||||
Reference in New Issue
Block a user