Repository navigation
66 lines (55 loc) · 1.74 KB
/
Copy pathfrontend.yml
File metadata and controls
66 lines (55 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Frontend CI
on:
push:
paths:
- 'frontend-panel/**'
- 'scripts/coverage-summary.mjs'
- '.github/workflows/frontend.yml'
branches: [master]
pull_request:
paths:
- 'frontend-panel/**'
- 'scripts/coverage-summary.mjs'
- '.github/workflows/frontend.yml'
branches: [master, develop]
concurrency:
group: frontend-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
frontend-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: frontend-panel
run: bun install --frozen-lockfile
- name: Lint
working-directory: frontend-panel
run: bun run check
- name: Run tests with coverage
working-directory: frontend-panel
run: bun run test:coverage
- name: Publish coverage summary
if: always() && hashFiles('frontend-panel/coverage/lcov.info') != ''
run: bun scripts/coverage-summary.mjs "Frontend" frontend-panel/coverage/lcov.info
- name: Upload coverage reports to Codecov
if: always() && hashFiles('frontend-panel/coverage/lcov.info') != ''
uses: codecov/codecov-action@v7
with:
files: frontend-panel/coverage/lcov.info
flags: frontend
name: frontend-panel
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
- name: Upload coverage artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: frontend-coverage
if-no-files-found: ignore
path: frontend-panel/coverage