feat: added first type of pagination for findby and bug fixing #105
This file contains hidden or 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: release-pullrequest | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| GHCR_REPO: ghcr.io/${{ github.repository }} | |
| jobs: | |
| build: | |
| name: Build and Push | |
| strategy: | |
| matrix: | |
| runner: [buildjet-2vcpu-ubuntu-2204-arm, buildjet-2vcpu-ubuntu-2204] | |
| include: | |
| - runner: buildjet-2vcpu-ubuntu-2204-arm | |
| platform: linux/arm64 | |
| - runner: buildjet-2vcpu-ubuntu-2204 | |
| platform: linux/amd64 | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Prepare | |
| run: | | |
| platform=${{ matrix.platform }} | |
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.GHCR_REPO }} | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and NOT push | |
| id: build | |
| uses: docker/build-push-action@v5 | |
| with: | |
| platforms: ${{ matrix.platform }} | |
| push: false | |
| labels: ${{ steps.meta.outputs.labels }} | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - name: Gather dependencies | |
| run: go mod download | |
| - name: Run coverage | |
| run: go test -race -tags=unit,integration -p 1 -coverprofile=coverage.txt -timeout 20m -covermode=atomic ./... | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |