Add format target #2
Workflow file for this run
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
# Bazelisk is included in github runners | |
# Bazel cache: https://docs.bazel.build/versions/main/output_directories.html | |
# NOTE: Cache path doesn't support env expansion | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
# Caches and restores the bazelisk download directory, the bazel build directory. | |
- name: Cache bazel | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/bazelisk | |
~/.cache/bazel | |
key: ${{ runner.os }}-bazel-cache | |
- uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "stable" | |
- name: generate | |
run: make generate | |
- name: format | |
run: make format | |
- name: test | |
run: make test | |
- name: checkgenerate | |
run: make checkgenerate | |
macos: | |
runs-on: macos-latest | |
steps: | |
# Caches and restores the bazelisk download directory, the bazel build directory. | |
- name: Cache bazel | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/bazelisk | |
/private/var/tmp/_bazel_runner | |
key: ${{ runner.os }}-bazel-cache | |
- uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "stable" | |
- name: generate | |
run: make generate | |
- name: format | |
run: make format | |
- name: test | |
run: make test | |
- name: checkgenerate | |
run: make checkgenerate | |
windows: | |
runs-on: windows-latest | |
steps: | |
# Caches and restores the bazelisk download directory, the bazel build directory. | |
- name: Cache bazel | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~\AppData\Local\bazelisk | |
~\_bazel_runneradmin | |
key: ${{ runner.os }}-bazel-cache | |
- uses: actions/checkout@v2 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "stable" | |
- name: generate | |
run: make generate | |
- name: format | |
run: make format | |
- name: test | |
run: make test | |
- name: checkgenerate | |
run: make checkgenerate |