Skip to content

Commit 10d3685

Browse files
authored
add minimal test account option in e2e-test.yml (#430)
1 parent 2d9a09e commit 10d3685

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

.github/workflows/e2e-test.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
name: Integration Tests
22

33
on:
4-
workflow_dispatch: null
4+
workflow_dispatch:
5+
inputs:
6+
use_minimal_test_account:
7+
description: 'Use minimal test account'
8+
required: false
9+
default: 'false'
10+
sha:
11+
description: 'The hash value of the commit'
12+
required: false
13+
default: ''
514
push:
615
branches:
716
- main
@@ -13,7 +22,16 @@ jobs:
1322
env:
1423
EXIT_STATUS: 0
1524
steps:
16-
- name: Clone Repository
25+
- name: Clone Repository with SHA
26+
if: ${{ inputs.sha != '' }}
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
submodules: 'recursive'
31+
ref: ${{ inputs.sha }}
32+
33+
- name: Clone Repository without SHA
34+
if: ${{ inputs.sha == '' }}
1735
uses: actions/checkout@v4
1836
with:
1937
fetch-depth: 0
@@ -40,20 +58,24 @@ jobs:
4058
mv calicoctl-linux-amd64 /usr/local/bin/calicoctl
4159
mv kubectl /usr/local/bin/kubectl
4260
61+
- name: Set LINODE_TOKEN
62+
run: |
63+
echo "LINODE_TOKEN=${{ secrets[inputs.use_minimal_test_account == 'true' && 'MINIMAL_LINODE_TOKEN' || 'LINODE_TOKEN'] }}" >> $GITHUB_ENV
64+
4365
- name: Run Integration tests
4466
run: |
4567
timestamp=$(date +'%Y%m%d%H%M')
4668
report_filename="${timestamp}_sdk_test_report.xml"
4769
make testint TEST_ARGS="--junitxml=${report_filename}"
4870
env:
49-
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
71+
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
5072

5173
- name: Apply Calico Rules to LKE
5274
if: always()
5375
run: |
5476
cd scripts && ./lke_calico_rules_e2e.sh
5577
env:
56-
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
78+
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
5779

5880
- name: Upload test results
5981
if: always()

0 commit comments

Comments
 (0)