refactor(cardinal): register query with generics #525
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: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
GO_VERSION: 1.21.0 | |
jobs: | |
e2e: | |
name: E2E | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Golang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Cache Golang Deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
/home/runner/go | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker images | |
uses: ScribeMD/[email protected] | |
with: | |
key: docker-${{ runner.os }}-${{ hashFiles('internal/e2e/tester/cardinal/Dockerfile') }} | |
- name: E2E Test Nakama | |
run: make e2e-nakama | |
- name: E2E docker compose logs last status | |
if: success() || failure() | |
run: | | |
docker compose logs | |
unit-test-coverage: | |
name: Unit & Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Golang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Cache Golang Deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
/home/runner/go | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Run Unit Test | |
run: make unit-test-all | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: true | |
directory: "./" |