Merge pull request #111 from klihub/devel/split-sync-messages #375
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 ] | |
jobs: | |
checks: | |
name: Project Checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- name: Set env | |
shell: bash | |
# TODO(thaJeztah): remove working-directory, path, and GOPATH once project-checks stops needing them; see https://github.com/containerd/nri/pull/53/commits/872fb0ce3dce136f3ae67c068ce78607565194ef#r1324366346 | |
run: | | |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- uses: actions/checkout@v4 | |
with: | |
path: src/github.com/containerd/nri | |
fetch-depth: 25 | |
- uses: containerd/project-checks@v1 | |
with: | |
working-directory: src/github.com/containerd/nri | |
test-build: | |
name: Check buildability | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- name: Set env | |
shell: bash | |
run: | | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Install protoc and plugins | |
run: | | |
sudo make install-protoc | |
make install-protoc-dependencies install-ttrpc-plugin | |
- name: Force regeneration of protobuf files on build | |
run: | | |
touch pkg/api/api.proto | |
- run: | | |
make all | |
- name: Validate files in git have not been changed | |
run: | | |
make validate-repo-no-changes | |
linters: | |
name: Linters | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
go: [1.22.3] | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set env | |
shell: bash | |
run: | | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.58.0 | |
tests: | |
name: Tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
go: [1.21.x, 1.22.3] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set env | |
shell: bash | |
run: | | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- run: | | |
make install-ginkgo test codecov |