diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..212ff68 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,51 @@ +name: tests + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + server-tests: + runs-on: ubuntu-latest + defaults: + run: + working-directory: Overlord-Server + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install server dependencies + run: bun install --frozen-lockfile + + - name: Run server tests + run: bun test + + client-tests: + runs-on: ubuntu-latest + defaults: + run: + working-directory: Overlord-Client + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: Overlord-Client/go.mod + cache: true + cache-dependency-path: | + Overlord-Client/go.sum + go.work.sum + + - name: Download Go modules + run: go mod download + + - name: Run client tests + run: go test ./...