fix: Improve token schedule to avoid session close #377
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: SonarCloud code analysis | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: ['main'] | |
| jobs: | |
| sonarcloud: | |
| name: SonarCloud | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libfuse2 libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libdrm2 libgbm1 libasound2t64 | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Install Electron | |
| run: cd node_modules/electron && node install.js | |
| - name: Install app dependencies | |
| run: cd release/app && npm ci | |
| - name: Build main process | |
| run: npm run build:main | |
| - name: Test and coverage | |
| run: npm run test:coverage | |
| - name: Merge coverage reports | |
| run: npm run coverage:merge | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |