Skip to content

Commit e72caa3

Browse files
chitadidplore
andauthored
Update test_gap_analysis.yaml (openconfig#5129)
Co-authored-by: Darren Loher <dloher@google.com>
1 parent 0eabc3f commit e72caa3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/test_gap_analysis.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# .github/workflows/test_gap_analysis.yaml
21
name: FNT Gap Analysis
32

43
on:
@@ -10,29 +9,36 @@ permissions: {}
109
jobs:
1110
gap_analysis_test:
1211
runs-on: ubuntu-latest
12+
env:
13+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
1314
permissions:
1415
contents: read
1516
pull-requests: read
1617
steps:
18+
- name: Show skip message
19+
if: ${{ env.GEMINI_API_KEY == '' }}
20+
run: echo "No access to Gemini, skipping test."
1721
- name: Checkout code
22+
if: ${{ env.GEMINI_API_KEY != '' }}
1823
uses: actions/checkout@v4
1924
with:
2025
fetch-depth: 0 # Needed for changed-files action to diff against base branch
2126

2227
- name: Set up Go
28+
if: ${{ env.GEMINI_API_KEY != '' }}
2329
uses: actions/setup-go@v5
2430
with:
2531
go-version: '1.21'
2632

2733
- name: Get changed files
34+
if: ${{ env.GEMINI_API_KEY != '' }}
2835
id: changed-files-pr
2936
uses: tj-actions/changed-files@v44
3037
with:
3138
separator: ','
3239

3340
- name: Run Gap Analysis Script
34-
env:
35-
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
41+
if: ${{ env.GEMINI_API_KEY != '' }}
3642
run: |
3743
echo "--- Building and Running FNT Gap Analysis ---"
3844
go build -o gap-analyzer tools/gap-analyzer/read_fnttests.go

0 commit comments

Comments
 (0)