Compare commits

...

5 Commits

Author SHA1 Message Date
Namu
9a24fc33c6 fix: correct the typo in action directory
Some checks failed
Build project / quality-and-build (push) Failing after 10m54s
Build project / SonarQube Trigger (push) Has been skipped
2026-03-23 14:30:19 +01:00
Namu
ce180792db fix: simplify the trigger of the CI 2026-03-23 14:28:00 +01:00
Namu
cc6dfa9d7f fix: correct file name 2026-03-23 14:25:09 +01:00
Namu
2617a082b0 feat: add a basic pipeline 2026-03-23 14:16:51 +01:00
Thomas Sazerat
4bf3c984eb Merge pull request #2 from Namularbre/hotfix/2.0.1
fix: follow clippy recommandation
2026-03-23 11:57:02 +01:00

View File

@@ -0,0 +1,54 @@
name: Build project
# run automatically when a push or pull request is triggered
on: [push, pull_request]
jobs:
build:
name: quality-and-build
runs-on: ubuntu-latest
env:
# Limit to 1 job for my little VPS
CARGO_BUILD_JOBS: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint with Clippy
run: cargo clippy -- -D warnings
- name: Run build (Debug mode)
run: cargo build
sonarqube:
needs: build
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download SonarQube Scanner
run: |
curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip
unzip sonar-scanner.zip
- name: Run SonarQube Scan
run: |
./sonar-scanner-*/bin/sonar-scanner \
-Dsonar.projectKey=UdpSocketServer \
-Dsonar.sources=. \
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}