1
0
mirror of https://github.com/kremalicious/gatsby-plugin-matomo.git synced 2024-12-23 09:42:12 +01:00
gatsby-plugin-matomo/.github/workflows/ci.yml

66 lines
1.4 KiB
YAML
Raw Normal View History

2020-02-24 01:12:01 +01:00
name: 'CI/CD Pipeline'
2021-02-01 00:03:55 +01:00
on:
push:
branches:
- main
2021-02-01 00:28:22 +01:00
tags:
- '**'
2021-02-01 00:03:55 +01:00
pull_request:
branches:
- '**'
2020-02-24 01:12:01 +01:00
jobs:
test:
2021-02-01 00:03:55 +01:00
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['14']
2020-02-24 01:12:01 +01:00
steps:
- uses: actions/checkout@v2
2021-02-01 00:03:55 +01:00
- uses: actions/setup-node@v2
2020-02-24 01:12:01 +01:00
with:
2021-02-01 00:03:55 +01:00
node-version: ${{ matrix.node }}
2020-02-24 01:12:01 +01:00
2021-02-01 00:03:55 +01:00
- run: npm ci
- run: npm test
- run: npm run build
coverage:
2021-11-28 16:39:43 +01:00
if: ${{ github.actor != 'dependabot[bot]' }}
2021-02-01 00:03:55 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm ci
- uses: paambaati/codeclimate-action@v2.7.5
2020-02-24 01:12:01 +01:00
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
2021-02-01 00:03:55 +01:00
with:
coverageCommand: npm test
2020-02-24 01:12:01 +01:00
publish:
needs: test
if: success() && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-02-01 00:03:55 +01:00
- uses: actions/setup-node@v2
2020-02-24 01:12:01 +01:00
with:
registry-url: 'https://registry.npmjs.org'
2021-02-01 00:03:55 +01:00
- run: npm ci
2020-02-24 01:12:01 +01:00
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - uses: actions/setup-node@v1
# with:
# registry-url: 'https://npm.pkg.github.com'
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}