Skip to content

Commit

Permalink
ci: run tests (#10)
Browse files Browse the repository at this point in the history
Runs tests (`go test`) in CI and enables codecov
  • Loading branch information
jaredallard committed Dec 21, 2023
1 parent bbac52b commit be2e9dd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: golangci-lint
name: tests
on:
push:
branches:
Expand All @@ -9,9 +9,27 @@ permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: self-hosted
gotest:
name: go test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/rtx-action@v1
env:
GH_TOKEN: ${{ github.token }}
- name: Run go test
run: |
go run gotest.tools/gotestsum@latest -- -coverprofile=cover.out ./...
- name: Upload test coverage
uses: codecov/codecov-action@v4.0.0-beta.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./cover.out
fail_ci_if_error: true

golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/rtx-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
goreleaser:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit be2e9dd

Please sign in to comment.