Fix broken builds #293
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deps: | |
name: Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.20' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Download dependencies | |
run: go mod download | |
unit-test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
needs: deps | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.20' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Setup dependencies | |
env: | |
GO111MODULE: off | |
run: make setup-ci | |
- name: Run tests | |
run: make test-coverage | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ~/go/bin/goveralls -coverprofile=coverprofile.out -service=github | |
e2e-test-nats: | |
name: Nats Test End to End | |
runs-on: ubuntu-latest | |
needs: deps | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.20' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run tests | |
run: make e2e-test-nats | |
e2e-test-grpc: | |
name: GRPC Test End to End | |
runs-on: ubuntu-latest | |
needs: deps | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.20' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Run tests | |
run: make e2e-test-grpc |