-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.54 KB
/
Copy pathci.yml
File metadata and controls
55 lines (44 loc) · 1.54 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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
# Full history for accurate SonarQube blame/new-code detection
fetch-depth: 0
# Installs the tool versions pinned in mise.toml (bun, node)
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Type-check
run: bun run type-check
- name: Test (with coverage)
run: bun run test:coverage
- name: Build
run: bun run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
- name: SonarQube scan
# Skipped until the SONAR_TOKEN secret is configured
# (secrets aren't readable in step `if`, so check via env)
if: ${{ env.SONAR_TOKEN != '' }}
uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0
env:
SONAR_HOST_URL: https://sonarcloud.io