mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-27 23:58:51 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: backend-tests
|
|
|
|
# Backend test suite for pull requests. Testcontainers-based tests need a
|
|
# Docker daemon, which the GitHub-hosted runners provide.
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: ["feat/authoring-*"]
|
|
|
|
jobs:
|
|
test:
|
|
name: test (PostgreSQL ${{ matrix.postgres }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# 16 is the deployment default; 17 is verified. See docs/skillhub/faq.md.
|
|
postgres: ["16", "17"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 21
|
|
cache: maven
|
|
|
|
- name: Set up Go for integration tests
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: github-sync-go/go.mod
|
|
cache-dependency-path: github-sync-go/go.mod
|
|
|
|
- name: Compile Go integration test dependencies
|
|
working-directory: github-sync-go
|
|
run: go test ./internal/worker -run '^$'
|
|
|
|
- name: Backend tests
|
|
run: cd server && ./mvnw -B test -Dskillhub.test.postgres.image=postgres:${{ matrix.postgres }}-alpine
|