Skip to content

Commit a76d254

Browse files
authored
test: Add option to run integration tests against minimal test account without any special customer tags (#621)
1 parent 0d4f59c commit a76d254

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.github/workflows/e2e-suite.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Integration Tests
22
on:
3-
workflow_dispatch: null
3+
workflow_dispatch:
4+
inputs:
5+
use_minimal_test_account:
6+
description: 'Use minimal test account'
7+
required: false
8+
default: 'false'
9+
sha:
10+
description: 'The hash value of the commit.'
11+
required: false
12+
default: ''
413
push:
514
branches:
615
- main
@@ -9,11 +18,18 @@ jobs:
918
integration-tests:
1019
name: Run integration tests
1120
runs-on: ubuntu-latest
12-
env:
13-
EXIT_STATUS: 0
1421
steps:
15-
- name: Clone Repository
16-
uses: actions/checkout@v3
22+
- name: Clone Repository with SHA
23+
if: ${{ inputs.sha != '' }}
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
submodules: 'recursive'
28+
ref: ${{ inputs.sha }}
29+
30+
- name: Clone Repository without SHA
31+
if: ${{ inputs.sha == '' }}
32+
uses: actions/checkout@v4
1733
with:
1834
fetch-depth: 0
1935
submodules: 'recursive'
@@ -45,20 +61,22 @@ jobs:
4561
env:
4662
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4763

64+
- name: Set LINODE_CLI_TOKEN
65+
run: |
66+
echo "LINODE_CLI_TOKEN=${{ secrets[inputs.use_minimal_test_account == 'true' && 'MINIMAL_LINODE_TOKEN' || 'LINODE_TOKEN'] }}" >> $GITHUB_ENV
67+
4868
- name: Run the integration test suite
4969
run: |
5070
timestamp=$(date +'%Y%m%d%H%M')
5171
report_filename="${timestamp}_cli_test_report.xml"
5272
make testint TEST_ARGS="--junitxml=${report_filename}"
53-
env:
54-
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN }}
5573
5674
- name: Apply Calico Rules to LKE
5775
if: always()
5876
run: |
5977
cd scripts && ./lke_calico_rules_e2e.sh
6078
env:
61-
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
79+
LINODE_TOKEN: ${{ env.LINODE_CLI_TOKEN }}
6280

6381
- name: Upload test results
6482
if: always()

.github/workflows/nightly-smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
run: |
3333
make smoketest
3434
env:
35-
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN_2 }}
35+
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN }}

0 commit comments

Comments
 (0)