diff --git a/.github/workflows/publish_dart_package.yaml b/.github/workflows/publish_dart_package.yaml index aa618774..31e62f57 100644 --- a/.github/workflows/publish_dart_package.yaml +++ b/.github/workflows/publish_dart_package.yaml @@ -14,6 +14,13 @@ on: description: | Tag prefix expected for this package (e.g., "shorebird_ci-v"). The version after the prefix must match the version in pubspec.yaml. + needs_redis: + required: false + default: false + type: boolean + description: | + Start a redis/redis-stack-server container before running tests. + Required for packages whose test suite connects to Redis. jobs: publish: @@ -26,6 +33,12 @@ jobs: - name: 📚 Git Checkout uses: actions/checkout@v6 + - name: 🐳 Run Redis + if: inputs.needs_redis + run: | + docker pull redis/redis-stack-server:latest + docker run --name test_redis -d -p 6379:6379 --rm -e REDIS_ARGS="--requirepass password" redis/redis-stack-server:latest + - name: 🎯 Setup Dart uses: dart-lang/setup-dart@v1 with: diff --git a/.github/workflows/publish_shorebird_redis_client.yaml b/.github/workflows/publish_shorebird_redis_client.yaml index 779b0664..daf7f835 100644 --- a/.github/workflows/publish_shorebird_redis_client.yaml +++ b/.github/workflows/publish_shorebird_redis_client.yaml @@ -11,5 +11,6 @@ jobs: with: working_directory: packages/redis_client tag_prefix: shorebird_redis_client-v + needs_redis: true permissions: id-token: write