Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
therossee authored Dec 8, 2023
1 parent a73f3d0 commit 023ea79
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
name: SonarCloud Analysis

name: Build
on:
push:
branches:
- main

push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm install

- name: Run tests with coverage
run: npm run test --coverage

- name: Debug
run: |
echo "Debug information..."
# Add any additional commands to print information for debugging
- name: SonarCloud Analysis
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: npm install
working-directory: backend
- name: Test and coverage
run: npm run test --coverage
working-directory: backend
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit 023ea79

Please sign in to comment.