4 Commits
Author SHA1 Message Date
austinried 29935b7bee build: mirror Maven Central for dependency resolution
The CI runner's egress IP is rate-limited by repo.maven.apache.org (HTTP 429 on a Robolectric native runtime jar), and a missing Gradle cache then breaks the run. Try Google's Maven Central mirror first and fall back to the canonical repository.
2026-11-01 05:45:25 +00:00
austinried 4bfe67ec19 build: add the nightly res through the directories set
AGP 9 deprecates AndroidSourceDirectorySet.srcDir() in favour of the directories mutable set, which was the last source-set deprecation warning in the build.
2026-11-01 05:35:04 +00:00
austinried 060a5f036f ci: key the test music cache by the demo album ids
The album id is the server id, so use it for the download, the local folder and the prune fixture instead of maintaining a separate remoteId mapping. The cache key moves to v3 because v2 may already hold folders named after the old local ids.
2026-11-01 03:19:17 +00:00
austinried c169549ef4 ci: take integration test music from the Navidrome demo
demo.subsonic.org no longer accepts the guest1 account, so the harness downloaded an XML error page and unzip failed before Gradle ran. Download the same three albums from demo.navidrome.org with the demo account, fetch each album's cover art into folder.jpg, and match the album title the files actually carry (Retroconnaissance, without the EP suffix). Bump the music cache key so stale copies from the old source are not reused.
2026-11-01 03:12:01 +00:00
7 changed files with 31 additions and 19 deletions
+1 -1
View File
@@ -50,5 +50,5 @@ jobs:
- uses: actions/cache@v6 - uses: actions/cache@v6
with: with:
path: .integration/music path: .integration/music
key: integration-music-v1 key: integration-music-v3
- run: nix develop .#integration --command nu tools/integration-test.nu - run: nix develop .#integration --command nu tools/integration-test.nu
+1 -1
View File
@@ -119,7 +119,7 @@ android {
} }
sourceSets { sourceSets {
getByName("debug").res.srcDir("src/nightly/res") getByName("debug").res.directories.add("src/nightly/res")
} }
buildTypes { buildTypes {
@@ -56,7 +56,7 @@ class SubsonicSourceIntegrationTest(
assertNotNull(kosmo.starred) assertNotNull(kosmo.starred)
assertTrue(kosmo.created <= System.currentTimeMillis() / 1000) assertTrue(kosmo.created <= System.currentTimeMillis() / 1000)
assertNull(albums.first { it.name == "Retroconnaissance EP" }.starred) assertNull(albums.first { it.name == "Retroconnaissance" }.starred)
assertNull(albums.first { it.name == "I Don't Know What I'm Doing" }.starred) assertNull(albums.first { it.name == "I Don't Know What I'm Doing" }.starred)
} }
@@ -92,7 +92,7 @@ class SubsonicSourceIntegrationTest(
.filter { it.artistId == artists.first { a -> a.name == "Ugress" }.id } .filter { it.artistId == artists.first { a -> a.name == "Ugress" }.id }
.map { it.name } .map { it.name }
.sorted() .sorted()
assertEquals(listOf("Kosmonaut", "Retroconnaissance EP"), ugressAlbums) assertEquals(listOf("Kosmonaut", "Retroconnaissance"), ugressAlbums)
val bradAlbums = val bradAlbums =
albums albums
@@ -22,7 +22,7 @@ class SubsonicWriteIntegrationTest(
.albums() .albums()
.toList() .toList()
.flatten() .flatten()
.first { it.name == "Retroconnaissance EP" } .first { it.name == "Retroconnaissance" }
source.setStar(StarType.Album, album.id, true) source.setStar(StarType.Album, album.id, true)
try { try {
@@ -94,7 +94,7 @@ class SubsonicWriteIntegrationTest(
.songs() .songs()
.toList() .toList()
.flatten() .flatten()
.first { it.album == "Retroconnaissance EP" } .first { it.album == "Retroconnaissance" }
source.setStar(StarType.Song, song.id, true) source.setStar(StarType.Song, song.id, true)
try { try {
@@ -93,7 +93,7 @@ class PruneSyncIntegrationTest {
?: error("$name is not set; run the integration harness (tools/integration-test.nu)") ?: error("$name is not set; run the integration harness (tools/integration-test.nu)")
private companion object { private companion object {
const val REMOVED_ALBUM_DIR = "197" const val REMOVED_ALBUM_DIR = "7GZYpfn8wypaTR00LWeNI4"
const val REMOVED_ALBUM_NAME = "Retroconnaissance EP" const val REMOVED_ALBUM_NAME = "Retroconnaissance"
} }
} }
+6
View File
@@ -7,6 +7,9 @@ pluginManagement {
includeGroupByRegex("androidx.*") includeGroupByRegex("androidx.*")
} }
} }
maven("https://maven-central.storage-download.googleapis.com/maven2/") {
name = "MavenCentralMirror"
}
mavenCentral() mavenCentral()
gradlePluginPortal() gradlePluginPortal()
} }
@@ -16,6 +19,9 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories { repositories {
google() google()
maven("https://maven-central.storage-download.googleapis.com/maven2/") {
name = "MavenCentralMirror"
}
mavenCentral() mavenCentral()
} }
} }
+17 -11
View File
@@ -12,11 +12,15 @@ export const LIB = ".integration/music"
export const ports = [$NAV_PORT $GONIC_PORT $LMS_PORT $NC_PORT $PRUNE_PORT] export const ports = [$NAV_PORT $GONIC_PORT $LMS_PORT $NC_PORT $PRUNE_PORT]
const MUSIC = [ const MUSIC = [
{ id: 197, name: "Ugress - Retroconnaissance EP", songs: 4 } { id: "7GZYpfn8wypaTR00LWeNI4", name: "Ugress - Retroconnaissance", songs: 4 }
{ id: 199, name: "Ugress - Kosmonaut", songs: 4 } { id: "5gMe1SlZZzuOMkRVWJaodV", name: "Ugress - Kosmonaut", songs: 4 }
{ id: 321, name: "Brad Sucks - I Don't Know What I'm Doing", songs: 12 } { id: "0JnRLI5lo4eNU1pOePqfcG", name: "Brad Sucks - I Don't Know What I'm Doing", songs: 12 }
] ]
const MUSIC_DOWNLOAD = "https://demo.navidrome.org/rest/download.view?u=demo&p=demo&v=1.16.1&c=subtracks-test&id="
const MUSIC_ART = "https://demo.navidrome.org/rest/getCoverArt.view?u=demo&p=demo&v=1.16.1&c=subtracks-test&id="
# Keep in step with TestServers.kt. # Keep in step with TestServers.kt.
export def test-servers [] { export def test-servers [] {
[ [
@@ -33,17 +37,18 @@ def song-count [dir: string] {
} }
export def ensure-music [] { export def ensure-music [] {
if ($MUSIC | all {|m| (song-count $"($LIB)/($m.id)") == $m.songs }) { if ($MUSIC | all {|m| (song-count $"($LIB)/($m.id)") == $m.songs and ($"($LIB)/($m.id)/folder.jpg" | path exists) }) {
print $"using test music in ($LIB)" print $"using test music in ($LIB)"
return return
} }
print "downloading test music from demo.subsonic.org (one-time)" print "downloading test music from demo.navidrome.org (one-time)"
mkdir $LIB mkdir $LIB
let tmp = (^mktemp -d | str trim) let tmp = (^mktemp -d | str trim)
for m in $MUSIC { for m in $MUSIC {
print $"($m.name)..." print $"($m.name)..."
^curl -fsS -o $"($tmp)/($m.id).zip" $"http://demo.subsonic.org/rest/download.view?u=guest1&p=guest&v=1.13.0&c=subtracks-test&id=($m.id)" ^curl -fsS -o $"($tmp)/($m.id).zip" $"($MUSIC_DOWNLOAD)($m.id)"
^unzip -q -o $"($tmp)/($m.id).zip" -d $"($LIB)/($m.id)" ^unzip -j -q -o $"($tmp)/($m.id).zip" -d $"($LIB)/($m.id)"
^curl -fsS -o $"($LIB)/($m.id)/folder.jpg" $"($MUSIC_ART)($m.id)"
} }
rm -rf $tmp rm -rf $tmp
} }
@@ -163,8 +168,9 @@ export def start-prune [work: string] {
let music = ($dir | path join "music") let music = ($dir | path join "music")
mkdir ($dir | path join "data") mkdir ($dir | path join "data")
mkdir $music mkdir $music
^cp -r $"((pwd) | path join $LIB)/197" $music for m in ($MUSIC | first 2) {
^cp -r $"((pwd) | path join $LIB)/199" $music ^cp -r $"((pwd) | path join $LIB)/($m.id)" $music
}
let daemon = (job spawn { ^navidrome --address 127.0.0.1 --port $PRUNE_PORT --musicfolder $music --datafolder ($dir | path join "data") --loglevel warn out+err> ($dir | path join "navidrome.log") }) let daemon = (job spawn { ^navidrome --address 127.0.0.1 --port $PRUNE_PORT --musicfolder $music --datafolder ($dir | path join "data") --loglevel warn out+err> ($dir | path join "navidrome.log") })
let ready = (try { let ready = (try {
@@ -198,12 +204,12 @@ export def prepare-fixtures [server: record] {
let albums = (poll "albums" {|| let albums = (poll "albums" {||
let items = (sub-get $base $user $pass "getAlbumList2" [["type" "newest"]] | get albumList2.album) let items = (sub-get $base $user $pass "getAlbumList2" [["type" "newest"]] | get albumList2.album)
if (["Kosmonaut" "Retroconnaissance EP" "I Don't Know What I'm Doing"] | all {|name| $items | any {|i| $i.name == $name } }) { $items } else { null } if (["Kosmonaut" "Retroconnaissance" "I Don't Know What I'm Doing"] | all {|name| $items | any {|i| $i.name == $name } }) { $items } else { null }
}) })
let ugress = (named-id $artists "Ugress") let ugress = (named-id $artists "Ugress")
let kosmo = (named-id $albums "Kosmonaut") let kosmo = (named-id $albums "Kosmonaut")
let retro = (named-id $albums "Retroconnaissance EP") let retro = (named-id $albums "Retroconnaissance")
let dunno = (named-id $albums "I Don't Know What I'm Doing") let dunno = (named-id $albums "I Don't Know What I'm Doing")
poll "album songs" {|| poll "album songs" {||