-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gha): only push images on merge/release
- Loading branch information
1 parent
43a7a51
commit c70a266
Showing
3 changed files
with
38 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Lint and run tests | ||
|
||
description: Lints and runs tests on the codebase, used before builds and on every PR | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.23 | ||
- name: Lint the codebase | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: -E goimports -E godot --timeout 10m | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
PICO_SECRET="danger" go test -v ./... -cover -race -coverprofile=coverage.out | ||
go tool cover -func=coverage.out -o=coverage.out |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Test PRs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Run tests and lint | ||
uses: ./.github/actions/test |