kuksa_go_client #13
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
# /******************************************************************************** | |
# * Copyright (c) 2022 Contributors to the Eclipse Foundation | |
# * | |
# * See the NOTICE file(s) distributed with this work for additional | |
# * information regarding copyright ownership. | |
# * | |
# * This program and the accompanying materials are made available under the | |
# * terms of the Apache License 2.0 which is available at | |
# * http://www.apache.org/licenses/LICENSE-2.0 | |
# * | |
# * SPDX-License-Identifier: Apache-2.0 | |
# ********************************************************************************/ | |
name: kuksa_go_client | |
on: | |
push: | |
pull_request: | |
paths: | |
- ".github/workflows/kuksa_go_client.yaml" | |
- "kuksa_go_client/**" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
kuksa-go-client-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout kuksa-incubation | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'kuksa_go_client/go.mod' | |
cache-dependency-path: 'kuksa_go_client/go.sum' | |
- run: go version | |
- name: Run go tests | |
run: | | |
cd kuksa_go_client | |
# We cannot use sudo apt install protobuf-compiler | |
# as default in Ubuntu 22.04 (3.12) consider optional as experimental feature | |
go run protocInstall/protocInstall.go | |
export PATH=$PATH:$HOME/protoc/bin | |
sudo chmod +x $HOME/protoc/bin/protoc | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
export PATH=$PATH:$HOME/go/bin | |
go generate . | |
go test . | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: latest | |
working-directory: kuksa_go_client | |
skip-pkg-cache: true |