mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
An update to the react typings were automerged because the passed the CI. In reality they broke the frontend build. Addings this job will make sure that the frontend always builds after updated dependencies.
68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
api:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: npm Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm run lint:api
|
|
- run: npm run test:cov
|
|
|
|
- name: Upload coverage results to codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
flags: unittests,api
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: npm Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm ci
|
|
working-directory: frontend
|
|
|
|
- run: npm run lint:frontend
|
|
|
|
- run: npm run build
|
|
working-directory: frontend
|
|
|
|
- name: Archive code coverage results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: code-coverage-report
|
|
path: coverage
|