From e9352aaa5de1f44196f5e83b7d2d464663ce97c2 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 14:12:09 -0400 Subject: [PATCH 1/6] chore(ci): fix redis connection --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96184bf0..56be5687 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,11 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] node: [14, 16, 18] runs-on: ${{ matrix.os }} + services: + redis: + image: redis:6.0.20 # https://hub.docker.com/_/redis + ports: + - 6379:6379 steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node }} @@ -36,7 +41,7 @@ jobs: run: yarn build - name: Run Tests env: - BULL_REDIS_CONNECTION: ${{ secrets.BULL_REDIS_CONNECTION }} + BULL_REDIS_CONNECTION: "http://127.0.0.1:6379" run: yarn test-verbose - name: Maybe Release if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main' From ed050048c6356ecd35fb6348c7b50a7dfa64eba2 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 14:19:29 -0400 Subject: [PATCH 2/6] Only run on ubuntu and fix connection string --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56be5687..860b652e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: node: [14, 16, 18] runs-on: ${{ matrix.os }} services: + if: ${{ matrix.os == 'ubuntu-latest' }} redis: image: redis:6.0.20 # https://hub.docker.com/_/redis ports: @@ -41,7 +42,7 @@ jobs: run: yarn build - name: Run Tests env: - BULL_REDIS_CONNECTION: "http://127.0.0.1:6379" + BULL_REDIS_CONNECTION: "redis://127.0.0.1:6379/0" run: yarn test-verbose - name: Maybe Release if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main' From 111f47d3f87fe034c00a2e3ac0157ab2c2be3e35 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 14:24:09 -0400 Subject: [PATCH 3/6] Fix conditional --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 860b652e..56493a60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: services: if: ${{ matrix.os == 'ubuntu-latest' }} redis: - image: redis:6.0.20 # https://hub.docker.com/_/redis + image: ${{ (matrix.os == 'ubuntu-latest') && 'redis:6.0.20' || '' }} ports: - 6379:6379 steps: From 3939f45293b07951eb85a603a75005222891db79 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 14:25:56 -0400 Subject: [PATCH 4/6] Remove unused `if` --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56493a60..19fc1a58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,6 @@ jobs: node: [14, 16, 18] runs-on: ${{ matrix.os }} services: - if: ${{ matrix.os == 'ubuntu-latest' }} redis: image: ${{ (matrix.os == 'ubuntu-latest') && 'redis:6.0.20' || '' }} ports: From 1c725cc7ee70bfaa2928616abfbdd5cb0ccd6140 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 14:41:11 -0400 Subject: [PATCH 5/6] Add a comment --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19fc1a58..e2cce58e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: runs-on: ${{ matrix.os }} services: redis: + # See workaround https://github.com/actions/runner/issues/822#issuecomment-1524826092 image: ${{ (matrix.os == 'ubuntu-latest') && 'redis:6.0.20' || '' }} ports: - 6379:6379 From 4569cf1ec2b876b815e51fb391e9c439235d01ae Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 14 Jul 2023 15:06:11 -0400 Subject: [PATCH 6/6] Conditional env var --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2cce58e..22675ac2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: run: yarn build - name: Run Tests env: - BULL_REDIS_CONNECTION: "redis://127.0.0.1:6379/0" + BULL_REDIS_CONNECTION: ${{ (matrix.os == 'ubuntu-latest') && 'redis://127.0.0.1:6379/0' || '' }} run: yarn test-verbose - name: Maybe Release if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'