Search-resolver in handleSearchCommon #14
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: Verify | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: # Handy for testing | |
jobs: | |
quesma-test-and-compile: | |
strategy: | |
matrix: | |
module: [ "quesma" ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Tune GitHub-hosted runner network | |
uses: smorimoto/tune-github-hosted-runner-network@v1 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache-dependency-path: ${{ matrix.module }}/go.sum | |
go-version: '1.22' | |
- name: gofmt | |
working-directory: ${{ matrix.module }} | |
run: gofmt -l -d . | (! grep . -q) || (gofmt -l -d .;exit 1) | |
- name: Go Vet | |
working-directory: ${{ matrix.module }} | |
run: go vet ./... | |
- uses: dominikh/[email protected] | |
with: | |
version: "2023.1.6" | |
install-go: false | |
working-directory: ${{ matrix.module }} | |
- name: Build | |
working-directory: ${{ matrix.module }} | |
run: go build -v ./... | |
- name: Test | |
working-directory: ${{ matrix.module }} | |
run: go test -race -v ./... | |
build-quesma-docker-image: | |
strategy: | |
matrix: | |
module: [ "quesma" ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache-dependency-path: ${{ matrix.module }}/go.sum | |
go-version: '1.22' | |
- name: Build and export | |
uses: docker/build-push-action@v5 | |
with: | |
context: ${{ matrix.module }}/. | |
tags: ${{ matrix.module }}:latest | |
outputs: type=docker,dest=/tmp/image.tar | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.module }} | |
path: /tmp/image.tar | |
retention-days: 1 | |
build-log-generator: | |
strategy: | |
matrix: | |
module: [ "log-generator" ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache-dependency-path: ${{ matrix.module }}/go.sum | |
go-version: '1.22' | |
- name: Build and export | |
uses: docker/build-push-action@v5 | |
with: | |
context: docker/${{ matrix.module }}/. | |
tags: ${{ matrix.module }}:latest | |
outputs: type=docker,dest=/tmp/image.tar | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.module }} | |
path: /tmp/image.tar | |
retention-days: 1 | |
smoke-test: | |
runs-on: ubuntu-latest | |
needs: [build-log-generator, build-quesma-docker-image] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
cache-dependency-path: smoke-test/go.sum | |
go-version: '1.22' | |
- name: Download images | |
uses: actions/download-artifact@v4 | |
with: | |
path: /tmp/images | |
- name: Load images | |
run: | | |
for file in /tmp/images/*/*.tar; do | |
docker load --input $file | |
done | |
docker image ls -a | |
- name: Build and start docker-compose | |
timeout-minutes: 10 | |
run: docker-compose -f docker/ci.yml up -d | |
- name: Wait until services are healthy | |
timeout-minutes: 6 | |
working-directory: smoke-test | |
run: go run main.go --wait-for-start | |
- name: Verify if data is flowing | |
working-directory: smoke-test | |
run: go run main.go | |
- name: Print docker status | |
if: failure() | |
run: docker-compose -f docker/ci.yml ps | |
- name: Print docker-compose logs | |
if: failure() | |
run: docker-compose -f docker/ci.yml logs |