CI #983
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] | |
tags: ['v*'] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '15 22 * * *' | |
workflow_dispatch: {} # support manual runs | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Go Modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-gomod-ci-${{ hashFiles('gradle.properties', 'gradle/libs.versions.toml') }} | |
restore-keys: | |
${{ runner.os }}-gomod-ci- | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'gradle' | |
- uses: bufbuild/buf-action@v1 | |
with: | |
setup_only: true | |
- env: | |
BUF_TOKEN: ${{ secrets.BUF_TOKEN }} | |
run: echo ${BUF_TOKEN} | buf registry login buf.build --token-stdin | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Lint | |
run: make lint | |
- name: Generate | |
run: make checkgenerate | |
- name: Build | |
run: make build | |
- name: Docs | |
run: make docs | |
- name: Execute tests | |
run: make test |