Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PR

on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Check formatting
run: |
UNFORMATTED="$(gofmt -l .)"
if [ -n "$UNFORMATTED" ]; then
echo "The following files are not gofmt-formatted:"
echo "$UNFORMATTED"
exit 1
fi
- name: Vet
run: go vet ./...

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- uses: bazel-contrib/setup-bazel@0.19.0
- name: Build Go CLI
run: go build ./cmd/moltark
- name: Build Bazel target
run: bazel build //:moltark

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- uses: bazel-contrib/setup-bazel@0.19.0
- name: Go tests
run: go test ./...
- name: Bazel tests
run: bazel test //...