Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
name: CI / CD Pipeline
name: CI Pipeline

on:
push:
branches:
- main
- pipeline
- '*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont think we should add everything. mabe just dev and main but not any?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? When I am developing a feature I want a check before merging if everything works as expected.

tags:
- 'v*.*'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
check-generated-and-lint-code:
name: Check Generated files and lint Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Run Make Generate
run: make generate

- name: Check for Uncommitted Changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "::error::Files were modified after running 'make generate'. Please run 'make generate' locally and commit the changes."
git status
git diff
exit 1
else
echo "Generated code is up to date!"
fi

- name: Run Make Prepare
run: make prepare

test-and-resources:
name: Test & Resource Management
runs-on: ubuntu-latest
Expand All @@ -28,12 +59,6 @@ jobs:
with:
go-version-file: 'go.mod'

- name: Make Scripts Executable
Comment thread
PaulicStudios marked this conversation as resolved.
run: chmod +x ./scripts/*.sh

- name: Add Binaries to PATH
run: echo "$PWD/bin" >> $GITHUB_PATH

- name: Load Key from GitHub Secrets
run: |
echo '${{ secrets.STACKIT_SERVICE_ACCOUNT_KEY }}' > $RUNNER_TEMP/service_account_key.json
Expand All @@ -56,7 +81,7 @@ jobs:
else
echo "Profile 'pubsub-qa' not found, skipping deletion."
fi

echo "pubsub-qa should been removed. Creating..."
stackit config profile import -c "@$RUNNER_TEMP/qa-env.json" --name pubsub-qa
stackit config profile set pubsub-qa
Expand Down
2 changes: 1 addition & 1 deletion bin/golangci-lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

exec mise exec go:github.com/golangci/golangci-lint/v2/cmd/golangci-lint -- golangci-lint "$@"
exec mise exec golangci-lint -- golangci-lint "$@"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/stackitcloud/pubsub-sdk-go

go 1.25.0
go 1.25.0 // Make sure this matches the version specified in the mise.toml

require (
github.com/go-logr/logr v1.4.3
github.com/google/uuid v1.6.0
github.com/joho/godotenv v1.5.1
github.com/kelseyhightower/envconfig v1.4.0
github.com/oapi-codegen/runtime v1.3.1
github.com/oapi-codegen/runtime v1.4.0
github.com/onsi/ginkgo/v2 v2.28.1
github.com/onsi/gomega v1.39.1
github.com/stackitcloud/stackit-sdk-go/core v0.22.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
github.com/maruel/natural v1.1.1/go.mod h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg=
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
github.com/oapi-codegen/runtime v1.3.1 h1:RgDY6J4OGQLbRXhG/Xpt3vSVqYpHQS7hN4m85+5xB9g=
github.com/oapi-codegen/runtime v1.3.1/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY=
github.com/oapi-codegen/runtime v1.4.0 h1:KLOSFOp7UzkbS7Cs1ms6NBEKYr0WmH2wZG0KKbd2er4=
github.com/oapi-codegen/runtime v1.4.0/go.mod h1:5sw5fxCDmnOzKNYmkVNF8d34kyUeejJEY8HNT2WaPec=
github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI=
github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=
github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=
Expand All @@ -57,8 +57,8 @@ github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8
github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
Expand Down
4 changes: 2 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tools]
go = "1.26.2"
go = "1.25.0" # Make sure this matches the go.mod
"go:gitlab.com/backbone/changelog/cmd/changelog" = "v1.1.0"
ginkgo = "2.28.1"
"go:github.com/axw/gocov/gocov" = "v1.1.0"
"go:github.com/AlekSi/gocov-xml" = "v1.2.0"
golangci-lint = "2.8.0"
oapi-codegen = "v2.6.0"
"go:github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" = "v2.7.0"

[settings]
# The go backend is experimental
Expand Down
52 changes: 46 additions & 6 deletions pkg/pubsub/api/sdk.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified scripts/create-pubsub-resources.sh
100644 → 100755
Empty file.
Empty file modified scripts/install_mise.sh
100644 → 100755
Empty file.
Loading