Refactor(db): DbObject Get method #1888
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: "Tests" | |
| on: [pull_request] | |
| jobs: | |
| tests: | |
| runs-on: [ ubuntu-latest ] | |
| env: | |
| DB_USER: my_username | |
| DB_PASSWORD: my_password | |
| DB_ROOT_PASSWORD: my_password | |
| DB_NAME: heureka | |
| DB_ADDRESS: localhost | |
| DB_PORT: 3306 | |
| DB_SCHEMA: internal/database/mariadb/init/schema.sql | |
| LOCAL_TEST_DB: true | |
| AUTHZ_FGA_API_URL: http://localhost:8080 | |
| AUTHZ_FGA_API_TOKEN: test_token | |
| AUTHZ_FGA_STORE_NAME: heureka_store | |
| AUTHZ_MODEL_FILE_PATH: ./../internal/openfga/model/model.fga | |
| services: | |
| mariadb: | |
| image: mariadb:latest | |
| ports: | |
| - "3306:3306" | |
| env: | |
| MARIADB_USER: my_username | |
| MARIADB_PASSWORD: my_password | |
| MARIADB_DATABASE: heureka | |
| MARIADB_ROOT_PASSWORD: my_password | |
| options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| valkey: | |
| image: valkey/valkey:7.2 | |
| ports: | |
| - "6379:6379" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Set up Docker Compose | |
| uses: docker/setup-compose-action@v2 | |
| - name: Install Ginkgo | |
| run: go install github.com/onsi/ginkgo/v2/ginkgo | |
| - name: Install Mockery | |
| run: go install github.com/vektra/mockery/v2@v2.53.5 | |
| - name: Generate Mockery code | |
| run: make mockery | |
| - name: Generate Gqlgen code | |
| run: make gqlgen | |
| - name: Start OpenFGA server | |
| run: docker compose -f docker-compose.yaml --profile openfga up -d | |
| - name: Run Tests | |
| run: ginkgo --trace -r -randomize-all -randomize-suites |