1+ # @ load("@ytt:data", "data")
2+ # @ load("ytt-helpers.star", "helpers")
3+
4+ name : unit-integration-tests
5+
6+ on :
7+ push :
8+ branches : [ "github-action" ]
9+ pull_request :
10+ branches : [ "github-action" ]
11+
12+ env :
13+ MAPPING : |
14+ build_nats_server=src/code.cloudfoundry.org/vendor/github.com/nats-io/nats-server/v2
15+ build_routing_api_cli=src/code.cloudfoundry.org/routing-api-cli
16+ FLAGS : |
17+ --keep-going
18+ --trace
19+ -r
20+ --fail-on-pending
21+ --randomize-all
22+ --nodes=7
23+ --race
24+ --timeout 30m
25+ --flake-attempts 2
26+ RUN_AS : root
27+ VERIFICATIONS : |
28+ verify_go repo/$DIR
29+ verify_go_version_match_bosh_release repo
30+ verify_gofmt repo/$DIR
31+ verify_govet repo/$DIR
32+ verify_staticcheck repo/$DIR
33+ FUNCTIONS : ci/routing-release/helpers/configure-binaries.bash
34+
35+ jobs :
36+ repo-clone :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - name : routing-release-repo
40+ uses : actions/checkout@v4
41+ with :
42+ repository : kart2bc/routing-release.git
43+ ref : github-action
44+ submodules : recursive
45+ path : repo
46+ - name : Check out wg-appruntime code
47+ uses : actions/checkout@v4
48+ with :
49+ repository : cloudfoundry/wg-app-platform-runtime-ci
50+ path : ci
51+ - name : zip repo artifacts
52+ run : |
53+ ls -l
54+ tar -czf repo-artifact.tar.gz repo
55+ tar -czf ci-artifact.tar.gz ci
56+ - name : upload artifact
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : repo
60+ path : |
61+ repo-artifact.tar.gz
62+ ci-artifact.tar.gz
63+ template-tests :
64+ runs-on : ubuntu-latest
65+ needs : repo-clone
66+ container :
67+ image : cloudfoundry/tas-runtime-mysql-5.7
68+ steps :
69+ - name : Download artifact
70+ uses : actions/download-artifact@v4
71+ with :
72+ name : repo
73+ - run : " tar -xzvf repo-artifact.tar.gz\n tar -xzvf ci-artifact.tar.gz\n ls -lR ${GITHUB_WORKSPACE}/ci/routing-release/helpers/ \n "
74+ - name : template-tests
75+ run : |
76+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-tests-templates/task.bash
77+ test-on-mysql-5-7 :
78+ runs-on : ubuntu-latest
79+ needs : repo-clone
80+ container :
81+ image : cloudfoundry/tas-runtime-mysql-5.7
82+ steps :
83+ - name : Download artifact
84+ uses : actions/download-artifact@v4
85+ with :
86+ name : repo
87+ - run : |
88+ tar -xzvf repo-artifact.tar.gz
89+ tar -xzvf ci-artifact.tar.gz
90+ ls -l
91+ - name : build binaries
92+ run : |
93+ ls -lR
94+ export DEFAULT_PARAMS="${GITHUB_WORKSPACE}/ci/routing-release/default-params/build-binaries/linux.yml"
95+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/build-binaries/task.bash
96+ # @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
97+ - name : # @ "{}-mysql".format(package.name)
98+ env :
99+ DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
100+ DB : mysql
101+ run : |
102+ "${GITHUB_WORKSPACE}"/ci/routing-release/helpers/configure-binaries.bash
103+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-bin-test/task.bash --keep-going --trace -r --fail-on-pending --randomize-all --nodes=7 --race --timeout 30m --flake-attempts 2
104+ # @ end
105+ test-repos-withoutdb :
106+ runs-on : ubuntu-latest
107+ needs : repo-clone
108+ container :
109+ image : cloudfoundry/tas-runtime-build
110+ steps :
111+ - name : Download artifact
112+ uses : actions/download-artifact@v4
113+ with :
114+ name : repo
115+ - run : |
116+ tar -xzvf repo-artifact.tar.gz
117+ tar -xzvf ci-artifact.tar.gz
118+ ls -l
119+ - name : build binaries
120+ run : |
121+ ls -lR
122+ export DEFAULT_PARAMS="${GITHUB_WORKSPACE}/ci/routing-release/default-params/build-binaries/linux.yml"
123+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/build-binaries/task.bash
124+ # @ for package in helpers.packages_without_configure_db(data.values.internal_repos):
125+ - name : # @ package.name
126+ env :
127+ DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
128+ run : |
129+ export DIR=$DIR
130+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-bin-test/task.bash --keep-going --trace -r --fail-on-pending --randomize-all --nodes=7 --race --timeout 30m --flake-attempts 2
131+ # @ end
132+ test-on-postgres :
133+ runs-on : ubuntu-latest
134+ needs : repo-clone
135+ container :
136+ image : cloudfoundry/tas-runtime-postgres
137+ steps :
138+ - name : Download artifact
139+ uses : actions/download-artifact@v4
140+ with :
141+ name : repo
142+ - run : |
143+ tar -xzvf repo-artifact.tar.gz
144+ tar -xzvf ci-artifact.tar.gz
145+ ls -l
146+ - name : build binaries
147+ run : |
148+ ls -lR
149+ export DEFAULT_PARAMS="${GITHUB_WORKSPACE}/ci/routing-release/default-params/build-binaries/linux.yml"
150+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/build-binaries/task.bash
151+ # @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
152+ - name : # @ "{}-mysql".format(package.name)
153+ env :
154+ DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
155+ DB : postgres
156+ run : |
157+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-bin-test/task.bash --keep-going --trace -r --fail-on-pending --randomize-all --nodes=7 --race --timeout 30m --flake-attempts 2
158+ # @ end
159+ test-on-mysql-8-0 :
160+ runs-on : ubuntu-latest
161+ needs : repo-clone
162+ container :
163+ image : cloudfoundry/tas-runtime-mysql-8.0
164+ steps :
165+ - name : Download artifact
166+ uses : actions/download-artifact@v4
167+ with :
168+ name : repo
169+ - run : |
170+ tar -xzvf repo-artifact.tar.gz
171+ tar -xzvf ci-artifact.tar.gz
172+ ls -l
173+ - name : build binaries
174+ run : |
175+ ls -lR
176+ export DEFAULT_PARAMS="${GITHUB_WORKSPACE}/ci/routing-release/default-params/build-binaries/linux.yml"
177+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/build-binaries/task.bash
178+ # @ for package in helpers.packages_with_configure_db(data.values.internal_repos):
179+ - name : # @ "{}-mysql".format(package.name)
180+ env :
181+ DIR : # @ "src/code.cloudfoundry.org/{}".format(package.name)
182+ DB : mysql
183+ run : |
184+ "${GITHUB_WORKSPACE}"/ci/shared/tasks/run-bin-test/task.bash --keep-going --trace -r --fail-on-pending --randomize-all --nodes=7 --race --timeout 30m --flake-attempts 2
185+ # @ end
0 commit comments