Documentation on mkunion and storage and resiliency #267
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: [ pull_request ] | |
jobs: | |
test-go: | |
name: Test implementation in Golang | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
id: go | |
- run: cd cmd/mkunion; go get -v -t -d ./... | |
- run: cd cmd/mkunion; go build -o mkunion | |
- run: go install github.com/matryer/moq@latest | |
- run: go get -v -t -d ./... | |
# generate code with mkunion | |
- run: ./cmd/mkunion/mkunion watch -g ./... | |
# generate code with go generate | |
- run: go generate ./... | |
- run: pip install awscli-local | |
- run: dev/bootstrap.sh -nologs | |
- run: | | |
find . -type f -name '*.go' -exec grep -C 2 -H 'github.com/opensearch-project/opensearch-go/v2' {} + &2>/dev/null || true | |
- run: | | |
ls -la /home/runner/go/pkg/mod/github.com/opensearch-project/opensearch-go | |
ls -la /home/runner/go/pkg/mod/cache/download/github.com/opensearch-project/opensearch-go | |
tree /home/runner/go/pkg/mod/github.com/opensearch-project/opensearch-go | |
tree /home/runner/go/pkg/mod/cache/download/github.com/opensearch-project/opensearch-go | |
- run: | | |
cat x/storage/schemaless/types_reg_gen.go | |
# run tests | |
- run: | | |
export RUN_EXPERIMENTAL_TEST="false" | |
set -e | |
retries=3 | |
until [ $retries -le 0 ]; do | |
if go test -v ./...; then | |
break | |
fi | |
echo "Retrying Go tests ($retries retries left)..." | |
retries=$((retries - 1)) | |
done | |
if [ $retries -eq 0 ]; then | |
echo "Go tests failed after all retries." | |
exit 1 | |
fi | |
- run: | | |
go test -race -coverprofile=coverage.out -covermode=atomic ./... || true | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.4.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: widmogrod/mkunion |