forked from linode/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.56 KB
/
coverage_badge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Coverage Badge
on:
push:
branches:
- master
jobs:
generate-coverage-badge:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js v20.17 LTS
uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Build @linode/validation
run: yarn build:validation
- name: Build @linode/api-v4
run: yarn build:sdk
- name: Run Base Branch Coverage
run: yarn 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