Github actions #3
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
name: CI | ||
on: | ||
pull_request: | ||
branches: [ "main", "develop" ] | ||
jobs: | ||
build: | ||
# runs-on: self-hosted | ||
steps: | ||
- name: Set up Go 1.21 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21 | ||
- name: Set up bazelisk | ||
uses: bazelbuild/setup-bazelisk@v2 | ||
- name: Set up cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.19.x' | ||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
- name: Check import formatting | ||
run: diff -u <(echo -n) <(find . \( -path "./carmen" -o -path "./tosca" \) -prune -o -name '*.go' -exec goimports -l {} \;) | ||
- name: Check code formatting | ||
run: diff -u <(echo -n) <(find . \( -path "./carmen" -o -path "./tosca" \) -prune -o -name '*.go' -exec gofmt -d -s {} \;) | ||
- name: Test | ||
run: go test -v ./... |