-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from onitake/test-artifacts
Refactor release process
- Loading branch information
Showing
5 changed files
with
115 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,57 @@ | ||
name: Build and test | ||
name: Build + Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
permissions: | ||
contents: read | ||
|
||
test-latest: | ||
name: Build and run unit tests with latest Go 1.x | ||
jobs: | ||
test: | ||
name: Build + Test (Latest Go) | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1' | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
run: make | ||
|
||
- name: Test | ||
run: make test | ||
|
||
test-release: | ||
name: Build and run unit tests with Go 1.20 | ||
releast-test: | ||
name: Test (Release Go) | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1.20' | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
run: make | ||
|
||
go-version: '^1' | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Test | ||
run: make test | ||
run: make DOCKER=docker release-test | ||
prerelease: | ||
name: Prerelease | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
# for uploading artifacts | ||
actions: write | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Release build | ||
run: make DOCKER=docker restreamer-linux-amd64 | ||
- name: Upload test artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: restreamer-linux-amd64 | ||
path: restreamer-linux-amd64 | ||
retention-days: 10 | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
module github.com/onitake/restreamer | ||
|
||
require github.com/prometheus/client_golang v1.16.0 | ||
require github.com/prometheus/client_golang v1.19.0 | ||
|
||
require ( | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect | ||
github.com/prometheus/client_model v0.3.0 // indirect | ||
github.com/prometheus/common v0.42.0 // indirect | ||
github.com/prometheus/procfs v0.10.1 // indirect | ||
golang.org/x/sys v0.8.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
github.com/prometheus/client_model v0.6.1 // indirect | ||
github.com/prometheus/common v0.52.2 // indirect | ||
github.com/prometheus/procfs v0.13.0 // indirect | ||
golang.org/x/sys v0.19.0 // indirect | ||
google.golang.org/protobuf v1.33.0 // indirect | ||
) | ||
|
||
go 1.19 | ||
go 1.21 | ||
|
||
toolchain go1.22.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters