Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated test matrix to latest go versions #209

Merged
merged 3 commits into from
Feb 15, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, windows]
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16']
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22']

steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 11 additions & 3 deletions features/fixtures/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ ENV GOPATH /app
COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

RUN go get ./...
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
go get ./...; \
else \
echo "Version is greater than 1.16, running go install"; \
go install ./...; \
fi

# Copy test scenarios
COPY ./app /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
Expand Down
2 changes: 1 addition & 1 deletion features/fixtures/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func multipleUnhandled() {
defer notifier.AutoNotify(ctx)
panic("oops")
}

//go:noinline
func unhandledCrash() {
// Invalid type assertion, will panic
func(a interface{}) string {
Expand Down
15 changes: 11 additions & 4 deletions features/fixtures/autoconfigure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ ENV GOPATH /app
COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

# Get bugsnag dependencies
RUN go get ./...
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
go get ./...; \
else \
echo "Version is greater than 1.16, running go install"; \
go install ./...; \
fi

# Copy test scenarios
COPY ./autoconfigure /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
Expand Down
15 changes: 11 additions & 4 deletions features/fixtures/net_http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ ENV GOPATH /app
COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

# Get bugsnag dependencies
RUN go get ./...
# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION

# Get bugsnag dependencies using a conditional call to run go get or go install based on the go version
RUN if [[ $(echo -e "1.11\n$GO_VERSION\n1.16" | sort -V | head -2 | tail -1) == "$GO_VERSION" ]]; then \
echo "Version is between 1.11 and 1.16, running go get"; \
go get ./...; \
else \
echo "Version is greater than 1.16, running go install"; \
go install ./...; \
fi

# Copy test scenarios
COPY ./net_http /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
Expand Down
Loading