-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (54 loc) · 2.02 KB
/
kuksa_go_client.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# /********************************************************************************
# * 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
# As we in protocInstall.go download a specific version of protoc we cannot use latest of the packages below
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
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