Skip to content

Commit b569fdc

Browse files
committed
re-write, separate steps/jobs analysis
1 parent f373285 commit b569fdc

File tree

9 files changed

+706
-216
lines changed

9 files changed

+706
-216
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Framework CLI Tests
2+
on:
3+
push:
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}-framework-cli
6+
cancel-in-progress: true
7+
jobs:
8+
framework-component-tests:
9+
defaults:
10+
run:
11+
working-directory: framework/cmd
12+
env:
13+
CTF_JD_IMAGE: ${{ secrets.CTF_JD_IMAGE }}
14+
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
17+
contents: read
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
21+
- name: Configure AWS credentials using OIDC
22+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
23+
with:
24+
role-to-assume: ${{ secrets.PUBLIC_AWS_ECR_ROLE }}
25+
aws-region: us-east-1
26+
- name: Authenticate to ECR Public
27+
id: login-ecr-public
28+
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
29+
with:
30+
registry-type: public
31+
- name: Check for changes in Framework
32+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
33+
id: changes
34+
with:
35+
filters: |
36+
src:
37+
- 'framework/cmd/**'
38+
- name: Set up Go
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version: '1.24.0'
42+
- name: Cache Go modules
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
~/.cache/go-build
47+
~/go/pkg/mod
48+
key: go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}-framework
49+
restore-keys: |
50+
go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}-framework
51+
- name: Install dependencies
52+
run: go mod download
53+
- name: Run Docker Component Tests
54+
if: steps.changes.outputs.src == 'true'
55+
run: |
56+
go test -race -timeout 2m -v -count 1 -run TestCLI

.nancy-ignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ CVE-2024-10086 # Improper Neutralization of Input During Web Page Generation ('C
1515
CVE-2024-51744 # CWE-755: Improper Handling of Exceptional Conditions
1616
CVE-2024-45338 # CWE-770: Allocation of Resources Without Limits or Throttling
1717
CVE-2024-45337 # CWE-863: Incorrect Authorization in golang.org/x/[email protected]
18-
CVE-2025-24883 # CWE-248: Uncaught Exception
18+
CVE-2025-24883 # CWE-248: Uncaught Exception
19+
CVE-2025-22869 # CWE-770: Allocation of Resources Without Limits or Throttling

book/src/framework/components/analyze_ci.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,36 @@
22

33
We offer a straightforward CLI tool designed to analyze CI runs, focusing on Jobs and Steps, to provide deeper insights into system-level tests.
44

5+
![img_1.png](img_1.png)
6+
7+
## What to look for
8+
9+
Check execution times, results are sorted by `median`.
10+
11+
We exclude any runs without `conclusion` or if they have `conclusion: "skipped"`.
12+
13+
🔄 - if you see high numbers here it means your pipeline is flaky, and it does not pass from the first attempt on some commits. It may indicate test flakiness!
14+
15+
🚫 - if numbers are high there it means your pipeline is constantly `cancelled` so it wastes time without bringing any results/value!
16+
517
## Examples
618
```
719
# GITHUB_TOKEN must have access to "actions" API
820
export GITHUB_TOKEN=...
921
10-
# E2E tests from core, the last day
11-
ctf ci -r "smartcontractkit/chainlink" -w "Integration Tests"
22+
# E2E test jobs from core for the last day
23+
ctf ci -r "smartcontractkit/chainlink" -w "CI Core" -t jobs
24+
25+
# E2E test steps from core for the last day
26+
ctf ci -r "smartcontractkit/chainlink" -w "CI Core" -t steps
27+
28+
# E2E tests from core for the last week (1k jobs limit!)
29+
ctf ci -r "smartcontractkit/chainlink" -w "CI Core" -t jobs -s 7
30+
31+
# E2E tests from core for some specific days from 5 days ago to 3 days ago
32+
ctf ci -r "smartcontractkit/chainlink" -w "CI Core" -t jobs -s 5 -e 3
1233
1334
# Last 3 days runs for e2e framework tests
14-
ctf ci -r "smartcontractkit/chainlink-testing-framework" -w "Framework Golden Tests Examples" -d 3
35+
ctf ci -r "smartcontractkit/chainlink-testing-framework" -w "Framework Golden Tests Examples" -t jobs -s 3
1536
```
37+
You can also use `-debug` flag to dump all the workflow runs/jobs to `ctf-ci-debug` folder.
163 KB
Loading

0 commit comments

Comments
 (0)