mirror of
https://github.com/azure/setup-kubectl.git
synced 2026-12-02 19:41:54 +00:00
70dd817170
Bumps the actions group with 3 updates in the /.github/workflows directory: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/analyze](https://github.com/github/codeql-action) and [actions/setup-python](https://github.com/actions/setup-python). Updates `github/codeql-action/init` from 4.38.3 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) Updates `github/codeql-action/analyze` from 4.38.3 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) Updates `actions/setup-python` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/5fda3b95a4ea91299a34e894583c3862153e4b97...6d4fd22b20465ccc0f7354476588e8df7c9ca0e0) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: github/codeql-action/analyze dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: actions/setup-python dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86 lines
2.7 KiB
YAML
86 lines
2.7 KiB
YAML
name: Integration test for setup-kubectl
|
|
on: # rebuild any PRs and main branch changes
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
|
|
jobs:
|
|
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:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
name: Checkout from PR branch
|
|
|
|
- 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
|
|
# remove node_modules to match production environment where only index.js is present
|
|
rm -rf node_modules
|
|
fi
|
|
|
|
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
name: Install Python
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install requests library
|
|
run: pip install requests
|
|
|
|
- name: Setup kubectl latest
|
|
uses: ./
|
|
with:
|
|
version: 'latest'
|
|
|
|
- name: Validate kubectl setup
|
|
run: python test/validate-kubectl.py latest
|
|
|
|
- name: Setup kubectl old version
|
|
uses: ./
|
|
with:
|
|
version: 'v1.15.1'
|
|
|
|
- name: Validate kubectl setup old version
|
|
run: python test/validate-kubectl.py 'v1.15.1'
|
|
|
|
- name: Fetch known SHA256 for v1.30.0 linux/amd64
|
|
id: sha
|
|
run: |
|
|
value=$(curl -fsSL https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl.sha256)
|
|
echo "value=$value" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Setup kubectl with valid checksum
|
|
uses: ./
|
|
with:
|
|
version: 'v1.30.0'
|
|
checksum: ${{ steps.sha.outputs.value }}
|
|
|
|
- name: Validate kubectl setup with checksum
|
|
run: python test/validate-kubectl.py 'v1.30.0'
|
|
|
|
- name: Setup kubectl with bad checksum (expect failure)
|
|
id: badsum
|
|
continue-on-error: true
|
|
uses: ./
|
|
with:
|
|
version: 'v1.29.0'
|
|
checksum: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
|
|
|
|
- name: Assert bad-checksum step failed
|
|
if: steps.badsum.outcome != 'failure'
|
|
run: |
|
|
echo "Expected bad-checksum step to fail, but outcome was: ${{ steps.badsum.outcome }}"
|
|
exit 1
|