DATAGO-107901: Use SSH key to push version bump and tags #1005
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: SonarQube | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| pull-requests: write | |
| actions: read | |
| statuses: write | |
| checks: write | |
| repository-projects: read | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }} | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install | |
| run: | | |
| echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc | |
| echo "@SolaceDev:registry=https://npm.pkg.github.com/" >> .npmrc | |
| echo "legacy-peer-deps=true" >> .npmrc | |
| npm ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # run storybook via test-runner and generate lcov code coverage file | |
| # - name: Build Storybook | |
| # working-directory: ./storybook | |
| # run: | | |
| # pwd | |
| # npm ci | |
| # npm run build-storybook --quiet | |
| # - name: Serve Storybook and run tests | |
| # working-directory: ./storybook | |
| # run: | | |
| # npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
| # "npx http-server storybook-static --port 6006 --silent" \ | |
| # "npx wait-on tcp:6006 && npm run test-storybook:ci" | |
| # - name: Install Playwright | |
| # run: npx playwright install --with-deps | |
| - name: Create common coverage directory | |
| working-directory: ./ | |
| run: mkdir coverage | |
| - name: Install Storybook | |
| working-directory: ./storybook | |
| run: npm ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Storybook Tests | |
| working-directory: ./storybook | |
| run: npm run test-storybook:ci | |
| - name: convert JSON coverage file to lcov format | |
| run: npx nyc report --reporter=lcov -t storybook/coverage/storybook --report-dir storybook/coverage/storybook | |
| - name: Move lcov file to common coverage dir | |
| run: mv ./storybook/coverage/storybook/lcov.info ./coverage/lcov-storybook.info | |
| # Placeholder ... run any other automation test coverage tools here | |
| - name: Combine Test Coverage Results | |
| run: | | |
| cd ./coverage | |
| npx lcov-result-merger 'lcov*.info' 'lcov-final.info' | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: lcove-artifacts | |
| path: ./coverage/lcov*.info | |
| - uses: sonarsource/sonarqube-scan-action@master | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |