[_] Feat/add security to call creation #161
Workflow file for this run
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 analysis | |
| on: | |
| push: | |
| branches: ['master'] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| permissions: | |
| pull-requests: read # allows SonarCloud to decorate PRs with analysis results | |
| jobs: | |
| Analysis: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node_version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| # Generate a .npmrc file with the NPM_TOKEN | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| - run: echo NODE_ENV=test >> ./.env.test | |
| - run: echo PORT=3006 >> ./.env.test | |
| - run: echo PAYMENTS_URL=http://payments-api:8003 >> ./.env.test | |
| - run: echo JWT_SECRET=jwt-secret >> ./.env.test | |
| - run: echo JITSI_SECRET=jitsi-secret-base64 >> ./.env.test | |
| - run: echo JITSI_APP_ID=jitsi-app-id >> ./.env.test | |
| - run: echo JITSI_API_KEY=jitsi-api-key >> ./.env.test | |
| - run: echo DB_NAME=xMeet >> ./.env.test | |
| - run: echo DB_HOSTNAME=meet-database >> ./.env.test | |
| - run: echo DB_USERNAME=postgres >> ./.env.test | |
| - run: echo DB_PASSWORD=example >> ./.env.test | |
| - run: echo DB_PORT=5434 >> ./.env.test | |
| - name: Install | |
| run: yarn install | |
| # - name: Check and Install Playwright | |
| # run: yarn playwright install | |
| - name: Unit test run | |
| run: yarn test:coverage | |
| # Analyze with SonarCloud | |
| - name: Analyze with SonarCloud | |
| uses: SonarSource/sonarcloud-github-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) |