Rama de prueba online #181
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| 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 webapp ci | |
| - run: npm --prefix gateway install | |
| - run: npm --prefix stats install | |
| - run: npm --prefix auth_service ci | |
| - run: npm --prefix webapp run test:coverage | |
| - run: npm --prefix gateway run test:coverage | |
| - run: npm --prefix stats run test:coverage | |
| - run: npm --prefix auth_service 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 }} |