generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 81
37 lines (36 loc) · 1.19 KB
/
codecov.yml
File metadata and controls
37 lines (36 loc) · 1.19 KB
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
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen".
name: codecov
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
collect:
runs-on: aws-cdk_ubuntu-latest_4-core
permissions:
id-token: write
if: github.repository == 'aws/aws-cdk-cli'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: yarn install
- name: Reset coverage thresholds
run: find . -name "jest.config.json" -type f -exec chmod +w {} \; -exec node -e "const fs=require('fs'); const file=process.argv[1]; const data=JSON.parse(fs.readFileSync(file)); data.coverageThreshold={ }; fs.writeFileSync(file, JSON.stringify(data, null, 2));" {} \;
- name: Build and test CLI
run: yarn nx run aws-cdk:build
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
disable_search: true
files: packages/aws-cdk/coverage/cobertura-coverage.xml
fail_ci_if_error: true
flags: suite.unit
use_oidc: true