diff --git a/.github/workflows/catch-up-release.yml b/.github/workflows/catch-up-release.yml index f72963b..1404209 100644 --- a/.github/workflows/catch-up-release.yml +++ b/.github/workflows/catch-up-release.yml @@ -19,6 +19,17 @@ jobs: contents: write pull-requests: write + services: + redis: + image: redis:7-alpine + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -102,13 +113,6 @@ jobs: if: steps.versions.outputs.needs_update == 'true' run: pnpm build - - name: Start Docker services - if: steps.versions.outputs.needs_update == 'true' - run: | - docker compose up -d - sleep 5 - docker ps - - name: Install Playwright browsers if: steps.versions.outputs.needs_update == 'true' run: | @@ -127,18 +131,14 @@ jobs: if: steps.versions.outputs.needs_update == 'true' id: test_redis run: | - # Flush Redis - docker exec nextjs-cache-redis redis-cli FLUSHALL + # Flush Redis (service container is accessible on localhost) + redis-cli -h localhost FLUSHALL # Build and test with Redis cd apps/e2e-test-app CACHE_HANDLER=redis pnpm build CACHE_HANDLER=redis pnpm test:e2e - - name: Stop Docker services - if: always() - run: docker compose down || true - - name: Create branch and commit if: steps.versions.outputs.needs_update == 'true' && inputs.dry_run != true run: | diff --git a/.github/workflows/nextjs-version-check.yml b/.github/workflows/nextjs-version-check.yml index abadc05..f26ed5d 100644 --- a/.github/workflows/nextjs-version-check.yml +++ b/.github/workflows/nextjs-version-check.yml @@ -13,6 +13,17 @@ jobs: contents: write pull-requests: write + services: + redis: + image: redis:7-alpine + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + outputs: needs_update: ${{ steps.check_version.outputs.needs_update }} latest_version: ${{ steps.check_version.outputs.latest_version }} @@ -38,7 +49,8 @@ jobs: id: check_version run: | # Get current Next.js version from e2e-test-app (what we're testing against) - CURRENT_NEXTJS=$(node -p "require('./apps/e2e-test-app/package.json').dependencies.next") + # Strip semver range prefix (^, ~, >=, etc.) to get bare version for comparison + CURRENT_NEXTJS=$(node -p "require('./apps/e2e-test-app/package.json').dependencies.next.replace(/^[^0-9]*/, '')") echo "Current Next.js in e2e-test-app: $CURRENT_NEXTJS" # Get current package version @@ -139,13 +151,6 @@ jobs: if: steps.check_version.outputs.needs_update == 'true' && steps.branch_check.outputs.branch_exists != 'true' run: pnpm build - - name: Start Docker services - if: steps.check_version.outputs.needs_update == 'true' && steps.branch_check.outputs.branch_exists != 'true' - run: | - docker compose up -d - sleep 5 - docker ps - - name: Install Playwright browsers if: steps.check_version.outputs.needs_update == 'true' && steps.branch_check.outputs.branch_exists != 'true' run: | @@ -164,8 +169,8 @@ jobs: - name: Run e2e tests with Redis if: steps.check_version.outputs.needs_update == 'true' && steps.branch_check.outputs.branch_exists != 'true' run: | - # Flush Redis - docker exec nextjs-cache-redis redis-cli FLUSHALL + # Flush Redis (service container is accessible on localhost) + redis-cli -h localhost FLUSHALL # Build and test with Redis cd apps/e2e-test-app @@ -174,10 +179,6 @@ jobs: continue-on-error: true id: test_redis - - name: Stop Docker services - if: always() - run: docker compose down || true - - name: Commit changes if: steps.check_version.outputs.needs_update == 'true' && steps.branch_check.outputs.branch_exists != 'true' run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 01cac3f..14e5798 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,6 @@ name: Publish to npm on: - release: - types: [published] push: tags: - "v*.*.*"