11name : Integration Tests
22
33on :
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
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