Skip to content

Commit

Permalink
Merge branch 'dev' into feat/add-distributed-tracing-support
Browse files Browse the repository at this point in the history
  • Loading branch information
oodigie committed Nov 27, 2023
2 parents 56e8968 + 7af7bfd commit b7562de
Show file tree
Hide file tree
Showing 4 changed files with 376 additions and 315 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ on: [push, pull_request, workflow_dispatch]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
# This workflow contains multiple jobs
# this job sets up the oldest version of go to check lang compatibility
CompatibilityCheck:
runs-on: ubuntu-20.04
#Steps for the compatiblity test
steps:
- uses: actions/checkout@v2
- name: Setup Go Environment
uses: actions/setup-go@v4
with:
go-version: '1.17.0'
- name: Check Go Version
run: go version
- name: Compiles
run: go build ./...
- name: Runs unit tests
if: ${{ success() }}
run: go test -coverprofile ./unitcoverage.out ./...
- name: Uploads artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
path: |
./unitcoverage.out
# this job runs linux based tests
Linux:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
Expand All @@ -17,7 +42,10 @@ jobs:
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: '1.20'
go-version: '1.21'
check-latest: true
- name: Check Go Version
run: go version
- name: Compiles
run: go build ./...

Expand Down
28 changes: 25 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ currentBuild.rawBuild.getParent().setQuietPeriod(0)

library 'jenkins-pipeline-library@main'

stage('Build') {
builder.goapi()
}
/*
Go Version examples:
auto-v1.17.x: Latest patch of 1.17 release
auto-v1.17.2: Specific patch of 1.17 release
auto-v1.17.0: First release of 1.17 (Despite go versioning this as 1.17)
auto-latest: Most recent patch version of latest minor release
auto-previous: Most recent patch version of previous minor release
auto-2previous: Most recent patch version of second last minor release
Adoption of new versions into these may be delayed.
*/

builder.goapi([
"buildCheckGoVer": 'auto-v1.17.x',
"validationGoVer": 'auto-v1.17.x',
"getTestPermutations": {
List<List<String>> permutations = []
for (platform in [builder.LINUX_ARM, builder.LINUX_X86_64, builder.LINUX_MUSL, builder.DARWIN_X86_64, builder.DARWIN_ARM]) {
for (gover in ['auto-latest', 'auto-previous']) {
permutations << [platform, gover]
}
}
return permutations
}
])
22 changes: 11 additions & 11 deletions test/helpers/resource_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ func CreateNonExclusiveQueue(queueName string, topics ...string) {

// CreatePartitionedQueue function
func CreatePartitionedQueue(queueName string, partitionCount int32, partitionRebalanceDelay int64, topics ...string) {
_, _, err := testcontext.SEMP().Config().QueueApi.CreateMsgVpnQueue(testcontext.SEMP() .ConfigCtx(), sempconfig.MsgVpnQueue{
QueueName: queueName,
AccessType: "non-exclusive",
Permission: "modify-topic",
IngressEnabled: True,
EgressEnabled: True,
PartitionCount: partitionCount,
PartitionRebalanceDelay: partitionRebalanceDelay,
Owner: "default",
}, testcontext.Messaging().VPN, nil)
ExpectWithOffset(1, err).ToNot(HaveOccurred(), "Failed to create queue with name "+queueName)
_, _, err := testcontext.SEMP().Config().QueueApi.CreateMsgVpnQueue(testcontext.SEMP().ConfigCtx(), sempconfig.MsgVpnQueue{
QueueName: queueName,
AccessType: "non-exclusive",
Permission: "modify-topic",
IngressEnabled: True,
EgressEnabled: True,
PartitionCount: partitionCount,
PartitionRebalanceDelay: partitionRebalanceDelay,
Owner: "default",
}, testcontext.Messaging().VPN, nil)
ExpectWithOffset(1, err).ToNot(HaveOccurred(), "Failed to create queue with name "+queueName)
for _, topic := range topics {
_, _, err = testcontext.SEMP().Config().QueueApi.CreateMsgVpnQueueSubscription(testcontext.SEMP().ConfigCtx(),
sempconfig.MsgVpnQueueSubscription{
Expand Down
Loading

0 comments on commit b7562de

Please sign in to comment.