Skip to content

Merge pull request #5 from begonia-org/feature/feat-grpc-proxy #20

Merge pull request #5 from begonia-org/feature/feat-grpc-proxy

Merge pull request #5 from begonia-org/feature/feat-grpc-proxy #20

Workflow file for this run

name: Go
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20.7
- name: Start Docker Composer
run: docker-compose up -d
- name: Init MySQL
run: |
export APP_ACCESS_KEY=NWkbCslfh9ea2LjVIUsKehJuopPb65fn
export APP_SECRET=oVPNllSR1DfizdmdSF7wLjgABYbexdt4FZ1HWrI81dD5BeNhsyXpXPDFoDEyiSVe
go run ./cmd/gateway/main.go init -e dev
- name: Type a temporary tag
run: git tag test-$(date '+%Y%m%d%H%M%S')
- name: Download protos
run: |
mkdir -p /tmp/protos
git clone https://github.com/begonia-org/protos.git /tmp/protos
- name: Test
run: go test -v -gcflags=-l -coverprofile=coverage.txt -covermode=atomic -ldflags -X=github.com/begonia-org/begonia.Version=$(git describe --tags --abbrev=0)\ -X=github.com/begonia-org/begonia.BuildTime=$(date '+%Y%m%d%H%M%S')\ -X=github.com/begonia-org/begonia.Commit=$(git rev-parse --short HEAD)\ -X=github.com/begonia-org/begonia.Env=test ./...
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}