perf(metarepos): add a pool for []*mrpb.Report #1682
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: | |
- main | |
pull_request: | |
env: | |
GO_VERSION: "1.20" | |
PYTHON_VERSION: 3.9 | |
GRPC_HEALTH_PROBE_VERSION: v0.4.13 | |
jobs: | |
gomod: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install tools | |
run: | | |
make tools | |
- name: Check go mod | |
run: | | |
make mod-tidy-check | |
make mod-vendor-check | |
- name: Check proto | |
run: | | |
make proto-check | |
- name: Check generate | |
run: | | |
make generate-check | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3.6.0 | |
with: | |
version: latest | |
skip-cache: true | |
skip-pkg-cache: true | |
build: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build | |
run: make build | |
test: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Coverage test | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
make test_coverage TEST_FLAGS='-race -failfast -count=1 -timeout=20m' | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3.1.4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.out,./coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
e2e_test: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install grpc_health_probe | |
run: | | |
wget -qO${PWD}/bin/grpc-health-probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${{ env.GRPC_HEALTH_PROBE_VERSION }}/grpc_health_probe-linux-amd64 | |
chmod +x ${PWD}/bin/grpc-health-probe | |
echo "${PWD}/bin" >> $GITHUB_PATH | |
- name: Test | |
run: | | |
whereis grpc-health-probe | |
make test_e2e_local TEST_FLAGS='-race -failfast -count=1 -timeout=20m' |