Skip to content

Commit 2af325d

Browse files
Updated CI to include LavinMQ tests
1 parent fe84575 commit 2af325d

File tree

11 files changed

+28151
-8
lines changed

11 files changed

+28151
-8
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Allowed regions config clone directory
2+
.ci-config
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Dependency directories
22+
node_modules/
23+
24+
# Optional npm cache directory
25+
.npm
26+
27+
# Optional eslint cache
28+
.eslintcache
29+
30+
# dotenv environment variables file
31+
.env
32+
.env.test
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Particular Software
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: setup-lavinmq-action
2+
description: Set up LavinMQ for testing
3+
inputs:
4+
connection-string-name:
5+
description: The name of the environment variable to fill with the LavinMQ connection string
6+
required: true
7+
tag:
8+
description: The name of the component LavinMQ is being used for. The LavinMQ namespace is tagged with this value.
9+
required: true
10+
host-env-var-name:
11+
description: The name of the environment variable to fill with the LavinMQ host name
12+
required: false
13+
image-tag:
14+
description: The tag of the LavinMQ container image
15+
required: false
16+
default: latest
17+
registry-login-server:
18+
description: The container registry to log in to, if required
19+
required: false
20+
default: index.docker.io
21+
registry-username:
22+
description: The username to log in to the container registry. Will not attempt login if not provided.
23+
required: false
24+
registry-password:
25+
description: The password to log in to the container registry. Will not attempt login if not provided.
26+
required: false
27+
28+
runs:
29+
using: node20
30+
main: dist/index.js
31+
post: dist/index.js
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
param (
2+
[string]$LavinMQName
3+
)
4+
5+
$resourceGroup = $Env:RESOURCE_GROUP_OVERRIDE ?? "GitHubActions-RG"
6+
$runnerOs = $Env:RUNNER_OS ?? "Linux"
7+
8+
if ($runnerOs -eq "Linux") {
9+
Write-Output "Killing Docker container $LavinMQName"
10+
docker kill $LavinMQName
11+
12+
Write-Output "Removing Docker container $LavinMQName"
13+
docker rm $LavinMQName
14+
}
15+
elseif ($runnerOs -eq "Windows") {
16+
Write-Output "Deleting Azure container $LavinMQName"
17+
az container delete --resource-group $resourceGroup --name $LavinMQName --yes | Out-Null
18+
}
19+
else {
20+
Write-Output "$runnerOs not supported"
21+
exit 1
22+
}

0 commit comments

Comments
 (0)