2020-12-12 23:29:25 +03:00
|
|
|
name: Continuous integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: null
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
continue-on-error: true
|
2020-12-30 22:58:36 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-12 23:29:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Use node.js 14.15
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14.15
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run lint
|
|
|
|
|
|
|
|
unit-tests:
|
2020-12-30 22:58:36 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-12 23:29:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Use node.js 14.15
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14.15
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run test:ci
|
2020-12-19 14:55:30 +03:00
|
|
|
- name: Publish coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
file: ./coverage/clover.xml
|
2020-12-12 23:29:25 +03:00
|
|
|
|
|
|
|
mutation-tests:
|
|
|
|
continue-on-error: true
|
2020-12-30 22:58:36 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-12 23:29:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2020-12-15 20:45:15 +03:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # needed so that the main branch is also fetched
|
2020-12-12 23:29:25 +03:00
|
|
|
- name: Use node.js 14.15
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14.15
|
|
|
|
- run: npm ci
|
2020-12-15 20:57:23 +03:00
|
|
|
- run: npm run mutate -- --mutate=$(git diff origin/main --name-only | grep -E 'src\/(.*).(ts|tsx)$' | paste -sd ",")
|
2020-12-12 23:29:25 +03:00
|
|
|
|
|
|
|
build-docker-image:
|
2020-12-30 22:58:36 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-12 23:29:25 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- run: docker build -t shlink-web-client:test .
|