2022-05-16 18:55:54 +02:00
|
|
|
name: Frontend Unit Tests
|
2022-05-12 15:24:58 +02:00
|
|
|
on:
|
2022-07-29 10:43:35 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- resources/assets/**
|
|
|
|
- .github/workflows/unit-frontend.yml
|
2022-05-12 15:24:58 +02:00
|
|
|
push:
|
|
|
|
branches:
|
2022-07-29 10:43:35 +02:00
|
|
|
- master
|
2022-05-16 18:55:54 +02:00
|
|
|
- next
|
2022-07-29 10:43:35 +02:00
|
|
|
paths:
|
|
|
|
- resources/assets/**
|
|
|
|
- .github/workflows/unit-frontend.yml
|
2022-05-12 15:24:58 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
branches:
|
2022-07-29 10:43:35 +02:00
|
|
|
- master
|
2022-05-16 18:55:54 +02:00
|
|
|
- next
|
2022-07-29 10:43:35 +02:00
|
|
|
paths:
|
|
|
|
- resources/assets/**
|
|
|
|
- .github/workflows/unit-frontend.yml
|
2022-05-12 15:24:58 +02:00
|
|
|
|
2022-10-09 13:32:52 +02:00
|
|
|
env:
|
|
|
|
LARAVEL_BYPASS_ENV_CHECK: 1
|
|
|
|
|
2022-05-12 15:24:58 +02:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2022-07-29 10:24:55 +02:00
|
|
|
fail-fast: false
|
2022-05-12 15:24:58 +02:00
|
|
|
matrix:
|
2022-10-09 13:23:22 +02:00
|
|
|
node-version: [ 14, 16, 17, 18 ] # 15 conflicts with @typescript-eslint/eslint-plugin@5
|
2022-05-12 15:24:58 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
2022-05-16 18:55:54 +02:00
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
2022-05-12 15:24:58 +02:00
|
|
|
- name: Run unit tests
|
|
|
|
run: yarn test:unit
|
2022-05-15 17:09:20 +02:00
|
|
|
- name: Collect coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|