-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.33 KB
/
build.yml
File metadata and controls
48 lines (47 loc) · 1.33 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
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.runCommand({ping:1})'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm --prefix users ci
- run: npm --prefix webapp ci
- run: npm --prefix users run test:coverage
- run: npm --prefix webapp run test:coverage
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Generate gamey code coverage
run: cd gamey && cargo llvm-cov --lcov --output-path lcov.info
- name: Normalize Rust coverage paths
run: |
sed -i "s|SF:${GITHUB_WORKSPACE}/|SF:|g" gamey/lcov.info
grep '^SF:' gamey/lcov.info | head
- name: Analyze with SonarQube
uses: SonarSource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}