Skip to content

Commit

Permalink
ci/cd: refactor (#9)
Browse files Browse the repository at this point in the history
update protoc, use internal bash scripts
  • Loading branch information
semyon-dev authored Jul 26, 2024
1 parent 16fca30 commit 4d9e103
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore

jobs:
run_build:
build:
runs-on: ubuntu-latest
steps:

Expand All @@ -22,10 +22,14 @@ jobs:
with:
go-version: '1.22.5'

- name: install protobuf
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: v27.2
include-pre-releases: false

- name: chmod +x
run: chmod +x ./scripts/install_deps && chmod +x ./scripts/build

- name: install dependencies
run: ./scripts/install_deps
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ env:
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore

jobs:
run_tests:
tests:
runs-on: ubuntu-latest
steps:

- name: clone repo
uses: actions/checkout@v3

Expand All @@ -22,25 +21,17 @@ jobs:
with:
go-version: '1.22.5'

- name: install protobuf
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: go_ins_1
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

- name: go_ins_2
run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

- name: generate
run: go generate ./...
- name: install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: v27.2
include-pre-releases: false

- name: check version
run: go version
- name: chmod to allow run script
run: chmod +x ./scripts/install_deps

- name: check folder
run: ls
- name: install dependencies
run: ./scripts/install_deps

- name: do tests
- name: go tests
run: go test -v ./...
Empty file modified scripts/build_all_platforms
100644 → 100755
Empty file.
Empty file modified scripts/install_deps
100644 → 100755
Empty file.

0 comments on commit 4d9e103

Please sign in to comment.