Skip to content

Commit

Permalink
chore(actions): tweak actions to build on vm (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r authored Aug 19, 2022
1 parent 6a24a51 commit 02ab2e3
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 12 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
run: |
make build
10 changes: 8 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ on:
jobs:
prerelease:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
env:
GOOS: linux
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
env:
GOOS: linux
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ jobs:

full-review:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: test
run: |
go test -race -covermode=atomic -coverprofile=coverage.out ./...
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
container:
image: golang:1.18

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: validate
run: |
# Check that go mod tidy produces a zero diff; clean up any changes afterwards.
Expand Down

0 comments on commit 02ab2e3

Please sign in to comment.