airsonic-pulse/.github/workflows/pr_ci.yml
litebito 0632b023f7
ci: bump GitHub Actions major versions across all workflows (#189)
Four major-version bumps held back from #175's SHA-pinning sweep because each
required a breaking-change review:

- actions/checkout            v5.0.1  → v6.0.2   (6 workflow files)
- docker/setup-buildx-action  v3.12.0 → v4.0.0   (release.yml)
- docker/login-action         v3.7.0  → v4.1.0   (release.yml)
- docker/build-push-action    v6.19.2 → v7.1.0   (release.yml)

Each bump is SHA-pinned to a specific commit with a # v<N>.x.x annotation
comment, matching the #175 convention. No tag-based references introduced.

Common change across all four: Node 24 default runtime. Self-hosted runner
fleet at v2.334.0 (well past the v2.327.1 / v2.329.0 minimums); fleet was
rebuilt in May 2026 with auto-update enabled.

Per-action breaking-change review:
- actions/checkout v6: persist-credentials moved to $RUNNER_TEMP — only
  affects container-action scenarios we don't use.
- docker/setup-buildx-action v4: deprecated inputs/outputs removed — our
  bare invocation has zero exposure.
- docker/login-action v4: misc cleanup; registry/username/password inputs
  unchanged.
- docker/build-push-action v7: removed DOCKER_BUILD_NO_SUMMARY and
  DOCKER_BUILD_EXPORT_RETENTION_DAYS envs (not set anywhere); removed
  legacy export-build summary tool. Our 5 inputs (context, platforms,
  push, tags, build-args) are stable in v7.

9 insertions / 9 deletions across 6 workflow files. No app code, Maven, or
non-workflow changes. Verification is CI on the PR plus next release tag
exercising release.yml end-to-end.

fixes #184

Co-authored-by: litebito <litebito@users.noreply.github.com>
2026-05-17 22:24:54 +02:00

95 lines
2.8 KiB
YAML

name: "CI - Pull Request"
on:
pull_request:
branches: [main]
paths-ignore:
- "contrib/**"
env:
DEFAULT_MUSIC_FOLDER: /tmp/music
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- db: hsqldb
maven-args: ""
- db: postgres
maven-args: "-DexcludedGroups=org.airsonic.player.util.EmbeddedTestCategory"
- db: mariadb
maven-args: "-DexcludedGroups=org.airsonic.player.util.EmbeddedTestCategory"
name: "build-and-test (${{ matrix.db }})"
services:
postgres:
image: ${{ matrix.db == 'postgres' && 'postgres:16-alpine' || '' }}
ports:
- 5432:5432
env:
POSTGRES_DB: airsonic
POSTGRES_USER: airsonic
POSTGRES_PASSWORD: airsonic
options: >-
--health-cmd "pg_isready -U airsonic"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mariadb:
image: ${{ matrix.db == 'mariadb' && 'mariadb:11-jammy' || '' }}
ports:
- 3306:3306
env:
MARIADB_DATABASE: airsonic
MARIADB_USER: airsonic
MARIADB_PASSWORD: airsonic
MARIADB_ROOT_PASSWORD: airsonic
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
spring_datasource_url: >-
${{ matrix.db == 'postgres'
&& 'jdbc:postgresql://localhost:5432/airsonic?stringtype=unspecified&raiseExceptionOnSilentRollback=false'
|| matrix.db == 'mariadb'
&& 'jdbc:mariadb://localhost:3306/airsonic'
|| '' }}
spring_datasource_username: ${{ matrix.db != 'hsqldb' && 'airsonic' || '' }}
spring_datasource_password: ${{ matrix.db != 'hsqldb' && 'airsonic' || '' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Verify environment
run: |
java -version
mvn --version
ffmpeg -version
- name: Create music directory
run: mkdir -p ${{ env.DEFAULT_MUSIC_FOLDER }}
- name: Build and test
run: >-
mvn clean verify
-Ddocker.testing.default-music-folder=${{ env.DEFAULT_MUSIC_FOLDER }}
${{ matrix.maven-args }}