Files
nahodka-back/.github/workflows/ci.yml
SlimusMinus d6c88f9e57 Add GitHub Actions CI: run gradle tests on PRs to master
Runs ./gradlew test (Temurin 25, Gradle cache, Testcontainers on the
runner's Docker) on every pull request to master and on push to master,
uploading build/reports/tests when tests fail. gradlew gets the
executable bit in git. The gitea deploy workflow is unchanged. README
describes the check and recommends making it required for master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:27:59 +03:00

42 lines
970 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: CI
on:
pull_request:
branches: [master]
push:
branches: [master]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: gradle test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 25
cache: gradle
# gradlew мог попасть в репозиторий с CRLF и без бита исполнения
- name: Prepare gradlew
run: sed -i 's/\r$//' gradlew && chmod +x gradlew
# Testcontainers поднимает PostgreSQL 15 в Docker раннера
- name: Test
run: ./gradlew test --no-daemon
- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-reports
path: build/reports/tests
retention-days: 14