Skip to content

Commit de8afa9

Browse files
authored
move windows integration tests to workflows (#461)
1 parent 359c4a2 commit de8afa9

File tree

3 files changed

+145
-1261
lines changed

3 files changed

+145
-1261
lines changed

.github/workflows/integration-per-language.yml

Lines changed: 102 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ jobs:
504504
- name: Fail if any error
505505
if: steps.deploy.outcome != 'success' || steps.rollout.outcome != 'success'
506506
run: exit 6
507-
manifest_update_job_name:
507+
manifest-update:
508508
needs: manifests-create
509509
runs-on: ubuntu-latest
510510
env:
@@ -554,3 +554,104 @@ jobs:
554554
kubectl get po
555555
echo "Deployment failed, check above logs and previous steps to isolate the issue"
556556
exit 6
557+
win-helm-create:
558+
runs-on: windows-latest
559+
steps:
560+
- uses: actions/checkout@v4
561+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
562+
with:
563+
name: draft-binary-win
564+
- run: mkdir ./langtest
565+
- uses: actions/checkout@v4
566+
with:
567+
repository: ${{ inputs.repo }}
568+
path: ./langtest
569+
- run: Remove-Item ./langtest/manifests -Recurse -Force -ErrorAction Ignore
570+
- run: Remove-Item ./langtest/base -Recurse -Force -ErrorAction Ignore
571+
- run: Remove-Item ./langtest/overlays -Recurse -Force -ErrorAction Ignore
572+
- run: Remove-Item ./langtest/charts -Recurse -Force -ErrorAction Ignore
573+
- run: Remove-Item ./langtest/Dockerfile -ErrorAction Ignore
574+
- run: Remove-Item ./langtest/.dockerignore -ErrorAction Ignore
575+
- run: ./draft.exe -v create -c ./test/integration/${{inputs.language}}/helm.yaml -d ./langtest/
576+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
577+
with:
578+
name: check_windows_helm
579+
path: ./langtest/
580+
- run: ./check_windows_helm.ps1
581+
working-directory: ./langtest/
582+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
583+
with:
584+
name: ${{inputs.language}}-win-helm-create
585+
path: |
586+
./langtest
587+
!./langtest/**/.git/*
588+
win-helm-update:
589+
needs: win-helm-create
590+
runs-on: windows-latest
591+
steps:
592+
- uses: actions/checkout@v4
593+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
594+
with:
595+
name: draft-binary-win
596+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
597+
with:
598+
name: ${{inputs.language}}-win-helm-create
599+
path: ./langtest/
600+
- run: Remove-Item ./langtest/charts/templates/ingress.yaml -Recurse -Force -ErrorAction Ignore
601+
- 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
602+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
603+
with:
604+
name: check_windows_addon_helm
605+
path: ./langtest/
606+
- run: ./check_windows_addon_helm.ps1
607+
working-directory: ./langtest/
608+
win-kustomize-create:
609+
runs-on: windows-latest
610+
steps:
611+
- uses: actions/checkout@v4
612+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
613+
with:
614+
name: draft-binary-win
615+
- run: mkdir ./langtest
616+
- uses: actions/checkout@v4
617+
with:
618+
repository: ${{ inputs.repo }}
619+
path: ./langtest
620+
- run: Remove-Item ./langtest/manifests -Recurse -Force -ErrorAction Ignore
621+
- run: Remove-Item ./langtest/base -Recurse -Force -ErrorAction Ignore
622+
- run: Remove-Item ./langtest/overlays -Recurse -Force -ErrorAction Ignore
623+
- run: Remove-Item ./langtest/charts -Recurse -Force -ErrorAction Ignore
624+
- run: Remove-Item ./langtest/Dockerfile -ErrorAction Ignore
625+
- run: Remove-Item ./langtest/.dockerignore -ErrorAction Ignore
626+
- run: ./draft.exe -v create -c ./test/integration/${{ inputs.language }}/kustomize.yaml -d ./langtest/
627+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
628+
with:
629+
name: check_windows_kustomize
630+
path: ./langtest/
631+
- run: ./check_windows_kustomize.ps1
632+
working-directory: ./langtest/
633+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
634+
with:
635+
name: ${{ inputs.language }}-win-kustomize-create
636+
path: |
637+
./langtest
638+
!./langtest/**/.git/*
639+
win-kustomize-update:
640+
needs: win-kustomize-create
641+
runs-on: windows-latest
642+
steps:
643+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
644+
with:
645+
name: draft-binary-win
646+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
647+
with:
648+
name: ${{inputs.language}}-win-kustomize-create
649+
path: ./langtest
650+
- run: Remove-Item ./langtest/overlays/production/ingress.yaml -ErrorAction Ignore
651+
- 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
652+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
653+
with:
654+
name: check_windows_addon_kustomize
655+
path: ./langtest/
656+
- run: ./check_windows_addon_kustomize.ps1
657+
working-directory: ./langtest/
Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# this file is generated using gen_integration.sh
2-
name: Linux Integration Tests
2+
name: Integration Tests
33
on:
44
pull_request:
55
branches: [main, staging]
66
workflow_dispatch:
77
jobs:
8-
build:
9-
name: Build Draft Binary
8+
build-linux:
9+
name: Build Draft Linux Binary
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
@@ -26,9 +26,47 @@ jobs:
2626
name: draft-binary
2727
path: ./draft
2828
if-no-files-found: error
29+
build-windows:
30+
name: Build Draft Windows Binary
31+
runs-on: windows-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set up Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: 1.22
38+
- name: make
39+
run: make
40+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
41+
with:
42+
name: draft-binary-win
43+
path: ./draft.exe
44+
if-no-files-found: error
45+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
46+
with:
47+
name: check_windows_helm
48+
path: ./test/check_windows_helm.ps1
49+
if-no-files-found: error
50+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
51+
with:
52+
name: check_windows_addon_helm
53+
path: ./test/check_windows_addon_helm.ps1
54+
if-no-files-found: error
55+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
56+
with:
57+
name: check_windows_kustomize
58+
path: ./test/check_windows_kustomize.ps1
59+
if-no-files-found: error
60+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
61+
with:
62+
name: check_windows_addon_kustomize
63+
path: ./test/check_windows_addon_kustomize.ps1
64+
if-no-files-found: error
2965
language-integration-test:
3066
name: Matrix
31-
needs: build
67+
needs:
68+
- build-linux
69+
- build-windows
3270
strategy:
3371
matrix:
3472
language: ["gomodule"] # we dont actually want a matrix here, so we include cases individually
@@ -61,7 +99,7 @@ jobs:
6199
language: ${{ matrix.language }}
62100
repo: ${{ matrix.repo }}
63101
linux-integration-summary:
64-
name: Linux Integration Summary
102+
name: Integration Test Summary
65103
needs: language-integration-test
66104
runs-on: ubuntu-latest
67105
steps:

0 commit comments

Comments
 (0)