-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: port ci to github actions, drop circleci
- Loading branch information
1 parent
4fb1f15
commit 34e0878
Showing
2 changed files
with
61 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
checks: write | ||
|
||
env: | ||
GO_VERSION: "1.18" | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
# running in a container enables us to use mongo{1,2,3} as a hostname | ||
# in our tests, since we are all part of the same docker network. | ||
# from the host, we would have to do port mappings | ||
container: | ||
# gh actions needs node, so use the node image | ||
image: node | ||
services: | ||
mongo1: | ||
image: mongo:5 | ||
mongo2: | ||
image: mongo:5 | ||
mongo3: | ||
image: mongo:5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: go install gotest.tools/gotestsum@latest | ||
- run: | | ||
REPORTDIR=$(mktemp -d) | ||
~/go/bin/gotestsum --junitfile $REPORTDIR/gotestsum-report.xml -- ./... | ||
- uses: mikepenz/action-junit-report@v4 | ||
if: success() || failure() | ||
with: | ||
report_paths: "$REPORTDIR/gotestsum-report.xml" | ||
include_passed: true | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: golangci/golangci-lint-action@v6 | ||
|
||
salus: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
sudo docker run -t -v $(pwd):/home/repo coinbase/salus |