Skip to content

Github actions

Github actions #2

Workflow file for this run

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/actions-setup-cmake@v1.13
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 ./...