Skip to content

Create CI/CD test and build in the Github action #2

Create CI/CD test and build in the Github action

Create CI/CD test and build in the Github action #2

Workflow file for this run

name: ci
on:
push:
pull_request:
concurrency:
# Cancel any running workflow for the same branch when new commits are pushed.
# We group both by ref_name (available when CI is triggered by a push to a branch/tag)
# and head_ref (available when CI is triggered by a PR).
group: "${{ github.ref_name }}-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: mod-check
run: make mod-check
- name: lint
run: make lint
- name: test
run: make test
- name: test-benchmarks
run: make test-benchmarks
- name: check-protos
run: make check-protos
# same like above jobs, but use go1.20
# todo: find a way to parameterise the go version
test-build-go-1.20:

Check failure on line 35 in .github/workflows/test-build.yml

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/test-build.yml (Line: 35, Col: 3): The identifier 'test-build-go-1.20' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: mod-check
run: make mod-check
- name: lint
run: make lint
- name: test
run: make test
- name: test-benchmarks
run: make test-benchmarks
- name: check-protos
run: make check-protos