a83bcf9869
refs linear.app/tryghost/issue/CORE-74/improve-the-test-situation - this commit adds the codecov GitHub Action into CI so we can upload coverage reports - the coverage files need to be in XML for them to work with codecov, so this commit also adds cobertura (XML) as a reporter
35 lines
761 B
YAML
35 lines
761 B
YAML
name: Test
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
matrix:
|
|
node: [ '14' ]
|
|
env:
|
|
FORCE_COLOR: 1
|
|
CI: true
|
|
name: Node ${{ matrix.node }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- run: yarn install
|
|
- run: yarn build
|
|
- run: yarn test:ci
|
|
|
|
- uses: codecov/codecov-action@v2
|
|
|
|
- uses: daniellockyer/action-slack-build@master
|
|
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
with:
|
|
status: ${{ job.status }}
|
|
env:
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|