Fix tests #2218
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
name: Lint and fmt check | |
runs-on: self-hosted | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Linting and fmt check | |
run: make lint | |
build: | |
name: CI on Go ${{ matrix.go-image-version}} | |
strategy: | |
matrix: | |
go-image-version: ["1.21"] | |
runs-on: self-hosted | |
steps: | |
- name: Set up Go ${{ matrix.go-image-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-image-version }} | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Unit tests | |
run: make test | |
- name: Start dependencies | |
run: make deps-start | |
- name: Running CI | |
run: | | |
sleep 0 | |
make ci | |
- name: Convert coverage file to lcov | |
run: | | |
GO111MODULE=off go get -u github.com/jandelgado/gcov2lcov | |
$(go env GOPATH)/bin/gcov2lcov -infile=coverage.txt -outfile=coverage.lcov | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./coverage.lcov | |
- name: e2e - Starting service | |
run: | | |
go build . | |
nohup ./service & | |
working-directory: ./examples/service | |
- name: Starting client | |
run: | | |
go run main.go | |
working-directory: ./examples/client | |
- name: Stop dependencies | |
run: make deps-stop | |