Skip to content

Commit

Permalink
Run Tests & Releases on Separate Runners (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrox authored Jun 10, 2023
1 parent d618f70 commit 952a768
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 468 deletions.
1 change: 1 addition & 0 deletions .github/actions/tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ runs:
run: |
go version
go mod tidy
git diff --exit-code
- name: Run Unit tests
shell: bash
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:
types:
- opened
- reopened
- synchronize

jobs:
main:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -20,6 +21,14 @@ jobs:
- name: Tests
uses: ./.github/actions/tests

release-image:
runs-on: ubuntu-latest
needs: tests
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
uses: ./.github/actions/docker-image
with:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- v*

jobs:
main:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -16,11 +16,25 @@ jobs:
- name: Tests
uses: ./.github/actions/tests

release-image:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
uses: ./.github/actions/docker-image
with:
token: "${{ secrets.GITHUB_TOKEN }}"

release-binaries:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Release
uses: ./.github/actions/go-release
with:
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ require (
github.com/gookit/goutil v0.5.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -36,6 +37,7 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/sys v0.6.0 // indirect
Expand Down
Loading

0 comments on commit 952a768

Please sign in to comment.