Refactoring Action for use with AKS Atlanta (#37)
* Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. * Testing release (#10) * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Did some reorganizing of code in run.ts, moved run.test.ts into /src, and put some helpers into helpers.ts in /src. * Grabbed the upstream integration tests and brought them here. Removed bash script. Added validateKubectl.py to /test folder for integration tests. * Ran npm run build * Ran npm run build * Updated on section for integration-tests.yml * Removing ruby commands from integration tests yaml. * Fixing discrepancies in integration test yaml. * Fixing discrepancies in integration test yaml. * Default to ubuntu-latest * renamed python script according to workflow. * renamed python script according to workflow. * Fixing path parameters. * Updated tsconfig.json * Testing for int test failure. * Validated that int tests work. * Added new workflows. Co-authored-by: Tommy Barnes <thbarnes@microsoft.com> * made changes reflected in comments Co-authored-by: Tommy Barnes <thbarnes@microsoft.com>
This commit is contained in:
parent
dae4b3de7f
commit
a10d84bc2e
16 changed files with 590 additions and 194 deletions
56
.github/workflows/integration-tests.yml
vendored
56
.github/workflows/integration-tests.yml
vendored
|
@ -1,19 +1,49 @@
|
|||
name: "Trigger Integration tests"
|
||||
on:
|
||||
name: Integration test for setup-kubectl
|
||||
on: # rebuild any PRs and main branch changes
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 'releases/*'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'releases/*'
|
||||
|
||||
jobs:
|
||||
trigger-integration-tests:
|
||||
name: Trigger Integration tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: IntegrationTests
|
||||
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@v2
|
||||
name: Checkout from PR branch
|
||||
|
||||
- name: Trigger Test run
|
||||
run: |
|
||||
bash ./IntegrationTests/.github/workflows/TriggerIntegrationTests.sh ${{ secrets.L2_REPO_TOKEN }} ${{ github.event.pull_request.head.sha }} ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.pull_request.head.ref }} ${{ github.event.pull_request.base.ref }} ${{ secrets.L2_REPO_USER }}
|
||||
- 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
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install requests library
|
||||
run: pip install requests
|
||||
|
||||
- name: Validate kubectl setup
|
||||
run: python test/validate-kubectl.py latest
|
||||
|
||||
- name: Setup kubectl
|
||||
uses: ./
|
||||
with:
|
||||
version: 'v1.15.1'
|
||||
|
||||
- name: Validate kubectl setup
|
||||
run: python test/validate-kubectl.py 'v1.15.1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue