mirror of
https://github.com/kremalicious/gatsby-plugin-matomo.git
synced 2025-02-14 21:10:42 +01:00
Merge pull request #23 from kremalicious/feature/github-actions
switch test run to GitHub Actions
This commit is contained in:
commit
79193d45ad
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: 'CI/CD Pipeline'
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '13.x'
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node
|
||||||
|
|
||||||
|
- run: npm install
|
||||||
|
- name: Run tests & publish code coverage
|
||||||
|
uses: paambaati/codeclimate-action@v2.4.0
|
||||||
|
with:
|
||||||
|
coverageCommand: npm test
|
||||||
|
env:
|
||||||
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
|
|
||||||
|
publish:
|
||||||
|
needs: test
|
||||||
|
if: success() && startsWith(github.ref, 'refs/tags')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '13.x'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
- run: npm install
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '13.x'
|
||||||
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -10,6 +10,6 @@
|
|||||||
"release": true
|
"release": true
|
||||||
},
|
},
|
||||||
"npm": {
|
"npm": {
|
||||||
"publish": true
|
"publish": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
.travis.yml
17
.travis.yml
@ -1,17 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js: node
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
||||||
- chmod +x ./cc-test-reporter
|
|
||||||
- ./cc-test-reporter before-build
|
|
||||||
|
|
||||||
script:
|
|
||||||
- npm test
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
@ -3,7 +3,7 @@
|
|||||||
# gatsby-plugin-matomo
|
# gatsby-plugin-matomo
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/gatsby-plugin-matomo)
|
[](https://www.npmjs.com/package/gatsby-plugin-matomo)
|
||||||
[](https://travis-ci.com/kremalicious/gatsby-plugin-matomo)
|
[](https://github.com/kremalicious/gatsby-plugin-matomo/actions)
|
||||||
[](https://codeclimate.com/github/kremalicious/gatsby-plugin-matomo/maintainability)
|
[](https://codeclimate.com/github/kremalicious/gatsby-plugin-matomo/maintainability)
|
||||||
[](https://codeclimate.com/github/kremalicious/gatsby-plugin-matomo/test_coverage)
|
[](https://codeclimate.com/github/kremalicious/gatsby-plugin-matomo/test_coverage)
|
||||||
[](https://greenkeeper.io/)
|
[](https://greenkeeper.io/)
|
||||||
|
Loading…
Reference in New Issue
Block a user