2022-01-05 17:19:30 +01:00
|
|
|
name: Integration test for setup-kubectl
|
|
|
|
on: # rebuild any PRs and main branch changes
|
2022-06-28 00:31:07 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- 'releases/*'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- 'releases/*'
|
2022-01-05 17:19:30 +01:00
|
|
|
|
2022-06-21 14:54:22 +02:00
|
|
|
jobs:
|
2022-06-28 00:31:07 +02:00
|
|
|
run-integration-test:
|
|
|
|
name: Validate release and master branch
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
KUBECONFIG: /home/runner/.kube/config
|
|
|
|
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
|
|
steps:
|
2024-09-11 21:32:13 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-28 00:31:07 +02:00
|
|
|
name: Checkout from PR branch
|
2022-06-21 14:54:22 +02:00
|
|
|
|
2022-06-28 00:31:07 +02:00
|
|
|
- id: action-npm-build
|
|
|
|
name: npm install and build
|
|
|
|
run: |
|
|
|
|
echo $PR_BASE_REF
|
|
|
|
if [[ $PR_BASE_REF != releases/* ]]; then
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
fi
|
2022-06-21 14:54:22 +02:00
|
|
|
|
2024-09-11 21:32:13 +02:00
|
|
|
- uses: actions/setup-python@v5
|
2022-06-28 00:31:07 +02:00
|
|
|
name: Install Python
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
2022-06-21 14:54:22 +02:00
|
|
|
|
2022-06-28 00:31:07 +02:00
|
|
|
- name: Install requests library
|
|
|
|
run: pip install requests
|
2022-01-05 17:19:30 +01:00
|
|
|
|
2024-10-23 21:24:24 +02:00
|
|
|
- name: Setup kubectl latest
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: 'latest'
|
|
|
|
|
2022-06-28 00:31:07 +02:00
|
|
|
- name: Validate kubectl setup
|
|
|
|
run: python test/validate-kubectl.py latest
|
2022-01-05 17:19:30 +01:00
|
|
|
|
2024-10-23 21:24:24 +02:00
|
|
|
- name: Setup kubectl old version
|
2022-06-28 00:31:07 +02:00
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
version: 'v1.15.1'
|
2022-01-05 17:19:30 +01:00
|
|
|
|
2024-10-23 21:24:24 +02:00
|
|
|
- name: Validate kubectl setup old version
|
2022-06-28 00:31:07 +02:00
|
|
|
run: python test/validate-kubectl.py 'v1.15.1'
|