Browse Source

ci: fix Maven artifact restoration in workflow

- Add step to restore Maven artifacts from download to ~/.m2/repository
- Restructure artifact upload to use consistent directory layout
- Remove obsolete 'version' field from docker-compose.yml to eliminate warnings
- Ensures SeaweedFS Java dependencies are available during test execution
pull/7526/head
chrislu 1 week ago
parent
commit
e63feb48fc
  1. 37
      .github/workflows/spark-integration-tests.yml
  2. 2
      test/java/spark/docker-compose.yml

37
.github/workflows/spark-integration-tests.yml

@ -75,13 +75,20 @@ jobs:
mvn clean install -DskipTests -Dgpg.skip=true
echo "✓ HDFS3 client built"
- name: Prepare artifacts for upload
run: |
echo "Preparing artifacts for upload..."
mkdir -p artifacts/docker
mkdir -p artifacts/.m2/repository/com
cp docker/weed artifacts/docker/
cp -r ~/.m2/repository/com/seaweedfs artifacts/.m2/repository/com/
echo "✓ Artifacts prepared"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: seaweedfs-build
path: |
docker/weed
~/.m2/repository/com/seaweedfs
path: artifacts/
retention-days: 1
spark-tests:
@ -106,6 +113,18 @@ jobs:
name: seaweedfs-build
path: .
- name: Restore Maven repository
run: |
echo "Restoring Maven artifacts to ~/.m2/repository..."
mkdir -p ~/.m2/repository/com
if [ -d ".m2/repository/com/seaweedfs" ]; then
cp -r .m2/repository/com/seaweedfs ~/.m2/repository/com/
echo "✓ Maven artifacts restored"
else
echo "⚠️ Warning: Maven artifacts not found in download"
ls -la
fi
- name: Start SeaweedFS services
working-directory: test/java/spark
run: |
@ -213,6 +232,18 @@ jobs:
name: seaweedfs-build
path: .
- name: Restore Maven repository
run: |
echo "Restoring Maven artifacts to ~/.m2/repository..."
mkdir -p ~/.m2/repository/com
if [ -d ".m2/repository/com/seaweedfs" ]; then
cp -r .m2/repository/com/seaweedfs ~/.m2/repository/com/
echo "✓ Maven artifacts restored"
else
echo "⚠️ Warning: Maven artifacts not found in download"
ls -la
fi
- name: Cache Apache Spark
id: cache-spark
uses: actions/cache@v4

2
test/java/spark/docker-compose.yml

@ -1,5 +1,3 @@
version: '3.8'
services:
seaweedfs-master:
build:

Loading…
Cancel
Save