Skip to content

Commit

Permalink
add minimal test account option in e2e-test.yml (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-akamai authored Jul 7, 2024
1 parent 2d9a09e commit 10d3685
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: Integration Tests

on:
workflow_dispatch: null
workflow_dispatch:
inputs:
use_minimal_test_account:
description: 'Use minimal test account'
required: false
default: 'false'
sha:
description: 'The hash value of the commit'
required: false
default: ''
push:
branches:
- main
Expand All @@ -13,7 +22,16 @@ jobs:
env:
EXIT_STATUS: 0
steps:
- name: Clone Repository
- name: Clone Repository with SHA
if: ${{ inputs.sha != '' }}
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
ref: ${{ inputs.sha }}

- name: Clone Repository without SHA
if: ${{ inputs.sha == '' }}
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -40,20 +58,24 @@ jobs:
mv calicoctl-linux-amd64 /usr/local/bin/calicoctl
mv kubectl /usr/local/bin/kubectl
- name: Set LINODE_TOKEN
run: |
echo "LINODE_TOKEN=${{ secrets[inputs.use_minimal_test_account == 'true' && 'MINIMAL_LINODE_TOKEN' || 'LINODE_TOKEN'] }}" >> $GITHUB_ENV
- name: Run Integration tests
run: |
timestamp=$(date +'%Y%m%d%H%M')
report_filename="${timestamp}_sdk_test_report.xml"
make testint TEST_ARGS="--junitxml=${report_filename}"
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}

- name: Apply Calico Rules to LKE
if: always()
run: |
cd scripts && ./lke_calico_rules_e2e.sh
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}

- name: Upload test results
if: always()
Expand Down

0 comments on commit 10d3685

Please sign in to comment.