Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 #309
Workflow file for this run
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: build | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
check-generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4.1.1 | |
- name: Install Protobuf | |
run: sudo snap install protobuf --classic | |
- name: Generate source files | |
run: go generate ./pkg/... | |
- name: Check if source files are up to date | |
run: git diff --exit-code HEAD | |
- name: Upload this project as an artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
if-no-files-found: error | |
name: project | |
path: | | |
.git/ | |
cmd/**/*.go | |
pkg/**/*.go | |
go.mod | |
go.sum | |
check-build: | |
needs: check-generate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download the project artifact | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: project | |
- name: Build targets | |
run: go build ./cmd/... | |
check-install: | |
needs: check-build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cmd: [bro, bro-backend] | |
steps: | |
- name: Install command | |
run: go install github.com/threeal/bro/cmd/${{ matrix.cmd }}@latest | |
- name: Run command | |
run: ~/go/bin/${{ matrix.cmd }} --help | |
unit-tests: | |
needs: check-generate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download the project artifact | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: project | |
- name: Install gotestsum | |
run: go install gotest.tools/gotestsum@latest | |
- name: Run tests | |
continue-on-error: ${{ github.event_name != 'pull_request' }} | |
run: ~/go/bin/gotestsum --junitfile test.xml -- -covermode atomic -coverprofile=profile.cov ./pkg/... | |
- name: Check test coverage | |
if: github.event_name == 'pull_request' | |
uses: vladopajic/go-test-coverage@v2.10.1 | |
with: | |
profile: profile.cov | |
local-prefix: github.com/threeal/bro | |
threshold-file: 100 | |
threshold-package: 100 | |
threshold-total: 100 | |
- name: Upload this test project as an artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
if-no-files-found: error | |
name: test-project | |
path: | | |
.git/ | |
pkg/**/*.go | |
go.mod | |
go.sum | |
profile.cov | |
test.xml | |
send-coverage-info: | |
needs: unit-tests | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download the test project artifact | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: test-project | |
- name: Send the code coverage info to Coveralls | |
uses: shogo82148/actions-goveralls@v1.9.0 | |
with: | |
path-to-profile: profile.cov | |
send-test-results: | |
needs: unit-tests | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download the test project artifact | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: test-project | |
- name: Download the Testspace client | |
run: curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- | |
- name: Configure the Testspace client | |
run: ./testspace config url ${{ secrets.TESTSPACE_URL }} | |
- name: Send the test results to Testspace | |
run: ./testspace [Tests]"test.xml" |