Merge pull request #12392 from linode/staging #61
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: Coverage Badge | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| generate-coverage-badge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| version: 10 | |
| - name: Use Node.js v20.17 LTS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.17" | |
| cache: "pnpm" | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build @linode/validation | |
| run: pnpm build:validation | |
| - name: Build @linode/api-v4 | |
| run: pnpm build:sdk | |
| - name: Run Base Branch Coverage | |
| run: pnpm coverage:summary | |
| - name: Generate Coverage Badge | |
| uses: jaywcjlove/coverage-badges-cli@7f0781807ef3e7aba97a145beca881d36451b7b7 # v1.1.1 | |
| with: | |
| label: "@linode/manager coverage" | |
| source: ./packages/manager/coverage/coverage-summary.json | |
| output: ./packages/manager/coverage/badges.svg | |
| - uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311 # v0.5.1 | |
| with: | |
| args: --acl public-read --follow-symlinks --delete | |
| env: | |
| AWS_S3_ENDPOINT: https://us-east-1.linodeobjects.com | |
| AWS_S3_BUCKET: ${{ secrets.COVERAGE_BUCKET }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.COVERAGE_BUCKET_ACCESS }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.COVERAGE_BUCKET_SECRET }} | |
| AWS_REGION: us-east-1 | |
| SOURCE_DIR: ./packages/manager/coverage |