Skip to content

Commit

Permalink
move windows integration tests to workflows (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamero authored Jan 2, 2025
1 parent 359c4a2 commit de8afa9
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 1,261 deletions.
103 changes: 102 additions & 1 deletion .github/workflows/integration-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ jobs:
- name: Fail if any error
if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success'
run: exit 6
manifest_update_job_name:
manifest-update:
needs: manifests-create
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -554,3 +554,104 @@ jobs:
kubectl get po
echo "Deployment failed, check above logs and previous steps to isolate the issue"
exit 6
win-helm-create:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: draft-binary-win
- run: mkdir ./langtest
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
path: ./langtest
- run: Remove-Item ./langtest/manifests -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/base -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/overlays -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/charts -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/Dockerfile -ErrorAction Ignore
- run: Remove-Item ./langtest/.dockerignore -ErrorAction Ignore
- run: ./draft.exe -v create -c ./test/integration/${{inputs.language}}/helm.yaml -d ./langtest/
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: check_windows_helm
path: ./langtest/
- run: ./check_windows_helm.ps1
working-directory: ./langtest/
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{inputs.language}}-win-helm-create
path: |
./langtest
!./langtest/**/.git/*
win-helm-update:
needs: win-helm-create
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: draft-binary-win
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{inputs.language}}-win-helm-create
path: ./langtest/
- run: Remove-Item ./langtest/charts/templates/ingress.yaml -Recurse -Force -ErrorAction Ignore
- run: ./draft.exe -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: check_windows_addon_helm
path: ./langtest/
- run: ./check_windows_addon_helm.ps1
working-directory: ./langtest/
win-kustomize-create:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: draft-binary-win
- run: mkdir ./langtest
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
path: ./langtest
- run: Remove-Item ./langtest/manifests -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/base -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/overlays -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/charts -Recurse -Force -ErrorAction Ignore
- run: Remove-Item ./langtest/Dockerfile -ErrorAction Ignore
- run: Remove-Item ./langtest/.dockerignore -ErrorAction Ignore
- run: ./draft.exe -v create -c ./test/integration/${{ inputs.language }}/kustomize.yaml -d ./langtest/
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: check_windows_kustomize
path: ./langtest/
- run: ./check_windows_kustomize.ps1
working-directory: ./langtest/
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{ inputs.language }}-win-kustomize-create
path: |
./langtest
!./langtest/**/.git/*
win-kustomize-update:
needs: win-kustomize-create
runs-on: windows-latest
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: draft-binary-win
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{inputs.language}}-win-kustomize-create
path: ./langtest
- run: Remove-Item ./langtest/overlays/production/ingress.yaml -ErrorAction Ignore
- run: ./draft.exe -v update -d ./langtest/ -a webapp_routing --variable ingress-tls-cert-keyvault-uri=test.cert.keyvault.uri --variable ingress-use-osm-mtls=true --variable ingress-host=host1
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: check_windows_addon_kustomize
path: ./langtest/
- run: ./check_windows_addon_kustomize.ps1
working-directory: ./langtest/
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# this file is generated using gen_integration.sh
name: Linux Integration Tests
name: Integration Tests
on:
pull_request:
branches: [main, staging]
workflow_dispatch:
jobs:
build:
name: Build Draft Binary
build-linux:
name: Build Draft Linux Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -26,9 +26,47 @@ jobs:
name: draft-binary
path: ./draft
if-no-files-found: error
build-windows:
name: Build Draft Windows Binary
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: make
run: make
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: draft-binary-win
path: ./draft.exe
if-no-files-found: error
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: check_windows_helm
path: ./test/check_windows_helm.ps1
if-no-files-found: error
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: check_windows_addon_helm
path: ./test/check_windows_addon_helm.ps1
if-no-files-found: error
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: check_windows_kustomize
path: ./test/check_windows_kustomize.ps1
if-no-files-found: error
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: check_windows_addon_kustomize
path: ./test/check_windows_addon_kustomize.ps1
if-no-files-found: error
language-integration-test:
name: Matrix
needs: build
needs:
- build-linux
- build-windows
strategy:
matrix:
language: ["gomodule"] # we dont actually want a matrix here, so we include cases individually
Expand Down Expand Up @@ -61,7 +99,7 @@ jobs:
language: ${{ matrix.language }}
repo: ${{ matrix.repo }}
linux-integration-summary:
name: Linux Integration Summary
name: Integration Test Summary
needs: language-integration-test
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit de8afa9

Please sign in to comment.