From 4a508d8a7ae3e45ea135c0496c42b96b934a102f Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:10:36 +0200 Subject: [PATCH 01/24] Add golangci-lint to GitHub Actions --- .github/workflows/linter.yaml | 19 +++++++++++++++++++ .github/workflows/release.yaml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linter.yaml diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 000000000..8c1c3cb4e --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,19 @@ +name: linter + +on: + pull_request: + +jobs: + golangcilint: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22 + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.57.2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5f43da0bb..c655c94cc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 From d71293630d07753e3976692fa97f6d83fbe6dd3b Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:17:50 +0200 Subject: [PATCH 02/24] Add x/sqlite linting step --- .github/workflows/linter.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 8c1c3cb4e..790c30510 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -13,7 +13,12 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22 - - name: golangci-lint + - name: Main module uses: golangci/golangci-lint-action@v6 with: version: v1.57.2 + - name: x/sqlite module + uses: golangci/golangci-lint-action@v6 + with: + working-directory: ./x/sqlite + version: v1.57.2 From 3994b0af35ec5e8c1c3207d1bf1c934eed1a1f0e Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:21:12 +0200 Subject: [PATCH 03/24] Add go.mod & go generate checks --- .github/workflows/linter.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 790c30510..547265390 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -13,12 +13,23 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.22 - - name: Main module + - name: Main module lint uses: golangci/golangci-lint-action@v6 with: version: v1.57.2 - - name: x/sqlite module + - name: x/sqlite module lint uses: golangci/golangci-lint-action@v6 with: working-directory: ./x/sqlite version: v1.57.2 + - name: Main module go.mod + run: | + go mod tidy -compat=1.17 && git diff --exit-code + - name: x/sqlite module go.mod + run: | + cd x/sqlite + go mod tidy && git diff --exit-code + - name: Main module generate + run: | + go generate ./... + git diff --exit-code From cdcea5675ebdebb20a74be9ed78f8091f6176933 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:22:45 +0200 Subject: [PATCH 04/24] Remove linter from GitLab config --- .gitlab-ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e6ac86f6f..e2aef8ddc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,15 +17,6 @@ test-x-sqlite: - go mod download - go test -race -shuffle=on ./... -linter-x-sqlite: - stage: test - image: golangci/golangci-lint:v1.57.2 - script: - - cd x/sqlite - - go mod download - - golangci-lint run ./... - - go mod tidy && git diff --exit-code - test: parallel: matrix: @@ -68,16 +59,6 @@ test: - go mod download - go test -race -shuffle=on ./... -linter: - stage: test - image: golangci/golangci-lint:v1.57.2 - script: - - go mod download - - golangci-lint run ./... - - go mod tidy -compat=1.17 && git diff --exit-code - - go generate ./... - - git diff --exit-code - coverage: stage: test image: golang:1.22 From e4c120a57df2d9f8e960e5c0fa68046a7d7e2fcd Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:26:13 +0200 Subject: [PATCH 05/24] Add sqlite tests for Go 1.22 to GHA --- .github/workflows/test-sqlite.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/test-sqlite.yaml diff --git a/.github/workflows/test-sqlite.yaml b/.github/workflows/test-sqlite.yaml new file mode 100644 index 000000000..8d55e5915 --- /dev/null +++ b/.github/workflows/test-sqlite.yaml @@ -0,0 +1,20 @@ +name: tests-sqlite + +on: + pull_request: + +jobs: + golangcilint: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22 + - name: Run tests + run: | + cd x/sqlite + go mod download + go test -race -shuffle=on ./... From fb74ca56d11142c6523949b1db528d12933e14cd Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:28:24 +0200 Subject: [PATCH 06/24] Add Go 1.23rc2 to x/sqlite test matrix Commented out; the action to get Go doesn't support rcs --- .github/workflows/test-sqlite.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-sqlite.yaml b/.github/workflows/test-sqlite.yaml index 8d55e5915..4dc8878ab 100644 --- a/.github/workflows/test-sqlite.yaml +++ b/.github/workflows/test-sqlite.yaml @@ -5,6 +5,9 @@ on: jobs: golangcilint: + strategy: + matrix: + go-version: [1.22] # TODO: Add 1.23rc2 name: test runs-on: ubuntu-latest steps: @@ -12,7 +15,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22 + check-latest: true + go-version: ${{ matrix.go-version }} - name: Run tests run: | cd x/sqlite From 386aacf51dc1388bea71819b818084d4188bdac1 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:39:11 +0200 Subject: [PATCH 07/24] Run unit tests on main module --- .github/workflows/test-sqlite.yaml | 2 +- .github/workflows/test.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test-sqlite.yaml b/.github/workflows/test-sqlite.yaml index 4dc8878ab..9e5dc76b2 100644 --- a/.github/workflows/test-sqlite.yaml +++ b/.github/workflows/test-sqlite.yaml @@ -4,7 +4,7 @@ on: pull_request: jobs: - golangcilint: + test: strategy: matrix: go-version: [1.22] # TODO: Add 1.23rc2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..31b89c487 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,23 @@ +name: tests + +on: + pull_request: + +jobs: + test: + strategy: + matrix: + go-version: [1.22] # TODO: Add 1.23rc2 + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + check-latest: true + go-version: ${{ matrix.go-version }} + - name: Run tests + run: | + go mod download + go test -race -shuffle=on ./... From f8bcf2552dd38ab4cb7ceb31955dc5c055af265f Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:43:56 +0200 Subject: [PATCH 08/24] Run integration tests with CouchDB 2.2.0 --- .github/workflows/test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 31b89c487..7a1d93ded 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,6 +10,12 @@ jobs: go-version: [1.22] # TODO: Add 1.23rc2 name: test runs-on: ubuntu-latest + services: + couchdb: + env: + COUCHDB_USER: admin + COUCHDB_PASSWORD: abc123 + image: couchdb:2.2.0 steps: - uses: actions/checkout@v4 - name: Set up Go @@ -17,6 +23,10 @@ jobs: with: check-latest: true go-version: ${{ matrix.go-version }} + - name: Prepare CouchDB + run: | + export KIVIK_TEST_DSN_COUCH22=http://$COUCHDB_USER:$COUCHDB_PASSWORD@couch2.2.0:5984/ + ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | go mod download From 74cbe2c85318468dcc6728faa97856503382ae22 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:45:31 +0200 Subject: [PATCH 09/24] Copy env vars --- .github/workflows/test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7a1d93ded..5c7f04261 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,6 +3,10 @@ name: tests on: pull_request: +env: + COUCHDB_USER: admin + COUCHDB_PASSWORD: abc123 + jobs: test: strategy: From dc3735a66ce6a949b4dbbcb1e2352d6e4633abec Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:52:41 +0200 Subject: [PATCH 10/24] debug --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c7f04261..0d92f40eb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,6 +29,8 @@ jobs: go-version: ${{ matrix.go-version }} - name: Prepare CouchDB run: | + env + echo ${COUCHDB_USER} export KIVIK_TEST_DSN_COUCH22=http://$COUCHDB_USER:$COUCHDB_PASSWORD@couch2.2.0:5984/ ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests From 5691a0c200f9b3d435b5c93326f3bf7349ec9f26 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:55:24 +0200 Subject: [PATCH 11/24] asdf --- .github/workflows/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0d92f40eb..529363c12 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,9 +29,9 @@ jobs: go-version: ${{ matrix.go-version }} - name: Prepare CouchDB run: | - env - echo ${COUCHDB_USER} - export KIVIK_TEST_DSN_COUCH22=http://$COUCHDB_USER:$COUCHDB_PASSWORD@couch2.2.0:5984/ + echo user: ${COUCHDB_USER} + echo password: ${COUCHDB_PASSWORD} + export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couch2.2.0:5984/ ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | From 21089d2942cb36d4d1a6943a380484698cbdb24c Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 16:58:40 +0200 Subject: [PATCH 12/24] asdf --- .github/workflows/test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 529363c12..dc83d773e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,7 +31,8 @@ jobs: run: | echo user: ${COUCHDB_USER} echo password: ${COUCHDB_PASSWORD} - export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couch2.2.0:5984/ + export KIVIK_TEST_DSN_COUCH22=http://$COUCHDB_USER:${COUCHDB_PASSWORD}@couch2.2.0:5984/ + echo dsn ${KIVIK_TEST_DSN_COUCH22} | base64 ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | From f5cebddc9db7de9d71184b8f570f6b7f7d2ea800 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:02:56 +0200 Subject: [PATCH 13/24] debug --- .github/workflows/test.yaml | 5 +---- script/complete_couch2.sh | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dc83d773e..0fe06e36e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,10 +29,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Prepare CouchDB run: | - echo user: ${COUCHDB_USER} - echo password: ${COUCHDB_PASSWORD} - export KIVIK_TEST_DSN_COUCH22=http://$COUCHDB_USER:${COUCHDB_PASSWORD}@couch2.2.0:5984/ - echo dsn ${KIVIK_TEST_DSN_COUCH22} | base64 + export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couch2.2.0:5984/ ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | diff --git a/script/complete_couch2.sh b/script/complete_couch2.sh index 587ee4de7..86b38cf10 100755 --- a/script/complete_couch2.sh +++ b/script/complete_couch2.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +set -x + for db in _users _replicator _global_changes; do echo ${1}/${db} status=$(curl --silent --write-out "%{http_code}" -o /dev/null -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} -X PUT "${1}/${db}") From 4e5dd048a7d4aeb74d1b1e5fecb7f6a9a35bb14c Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:08:11 +0200 Subject: [PATCH 14/24] service name --- .github/workflows/test.yaml | 2 +- script/complete_couch2.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0fe06e36e..5bac9ed05 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Prepare CouchDB run: | - export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couch2.2.0:5984/ + export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984/ ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | diff --git a/script/complete_couch2.sh b/script/complete_couch2.sh index 86b38cf10..f25657204 100755 --- a/script/complete_couch2.sh +++ b/script/complete_couch2.sh @@ -3,7 +3,6 @@ set -x for db in _users _replicator _global_changes; do -echo ${1}/${db} status=$(curl --silent --write-out "%{http_code}" -o /dev/null -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} -X PUT "${1}/${db}") case ${status} in 2*) From 68f413e2f595e2b938cdb4a901a2ee168e5b933b Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:09:10 +0200 Subject: [PATCH 15/24] non-silent curl --- script/complete_couch2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/complete_couch2.sh b/script/complete_couch2.sh index f25657204..a69ca320e 100755 --- a/script/complete_couch2.sh +++ b/script/complete_couch2.sh @@ -3,7 +3,7 @@ set -x for db in _users _replicator _global_changes; do - status=$(curl --silent --write-out "%{http_code}" -o /dev/null -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} -X PUT "${1}/${db}") + status=$(curl --write-out "%{http_code}" -o /dev/null -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} -X PUT "${1}/${db}") case ${status} in 2*) # Success! From 42cb014059c13200979afda36acfd56d13c27e8b Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:15:45 +0200 Subject: [PATCH 16/24] sleep --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5bac9ed05..b30a3ed18 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,6 +30,7 @@ jobs: - name: Prepare CouchDB run: | export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984/ + sleep 60 ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | From bb0da9084ecd31b8a7363edc49e0a5849c98e1c1 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:21:04 +0200 Subject: [PATCH 17/24] debug --- .github/workflows/test.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b30a3ed18..8c28ffb5b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,7 +30,10 @@ jobs: - name: Prepare CouchDB run: | export KIVIK_TEST_DSN_COUCH22=http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@couchdb:5984/ - sleep 60 + while ! curl -sSf http://couchdb:5984/; do + echo "Waiting for CouchDB to be ready..." + sleep 5 + done ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22} - name: Run tests run: | From 7ed0e9ea0c9cd6c9a45a2ba34d8794bfb43fca09 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:26:09 +0200 Subject: [PATCH 18/24] debug --- .github/workflows/test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8c28ffb5b..db4bdbab8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,6 +20,11 @@ jobs: COUCHDB_USER: admin COUCHDB_PASSWORD: abc123 image: couchdb:2.2.0 + options: >- + --health-cmd "curl -sSf http://localhost:5984/_up" + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - uses: actions/checkout@v4 - name: Set up Go From 00369dec3944a8532191b46a3b45254406e7a9c2 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:33:57 +0200 Subject: [PATCH 19/24] Separate container-job --- .github/workflows/test.yaml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index db4bdbab8..c304a2de1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,23 +8,29 @@ env: COUCHDB_PASSWORD: abc123 jobs: + container-job: + runs-on: ubuntu-latest + container: node:16-bullseye + services: + couchdb: + image: couchdb:2.2.0 test: strategy: matrix: go-version: [1.22] # TODO: Add 1.23rc2 name: test runs-on: ubuntu-latest - services: - couchdb: - env: - COUCHDB_USER: admin - COUCHDB_PASSWORD: abc123 - image: couchdb:2.2.0 - options: >- - --health-cmd "curl -sSf http://localhost:5984/_up" - --health-interval 10s - --health-timeout 5s - --health-retries 5 + # services: + # couchdb: + # env: + # COUCHDB_USER: admin + # COUCHDB_PASSWORD: abc123 + # image: couchdb:2.2.0 + # options: >- + # --health-cmd "curl -sSf http://localhost:5984/_up" + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 steps: - uses: actions/checkout@v4 - name: Set up Go From 616abff1358b678beaa174b4c67c0929bb1d7a68 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:35:48 +0200 Subject: [PATCH 20/24] x --- .github/workflows/test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c304a2de1..5c7c8fe7e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,10 +10,10 @@ env: jobs: container-job: runs-on: ubuntu-latest - container: node:16-bullseye - services: - couchdb: - image: couchdb:2.2.0 + # container: node:16-bullseye +# services: +# couchdb: +# image: couchdb:2.2.0 test: strategy: matrix: From d65e1af13ce216eadd52964e9882ddcca5bf2369 Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:45:55 +0200 Subject: [PATCH 21/24] x --- .github/workflows/test.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c7c8fe7e..534adec6a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,10 +10,11 @@ env: jobs: container-job: runs-on: ubuntu-latest - # container: node:16-bullseye -# services: -# couchdb: -# image: couchdb:2.2.0 + container: + image: node:16-bullseye + services: + couchdb: + image: couchdb:2.2.0 test: strategy: matrix: From 2f6fb34c8354d119f5af9222e19d0d552099613d Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:46:33 +0200 Subject: [PATCH 22/24] asdf --- .github/workflows/test.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 534adec6a..7be14982e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,6 +15,11 @@ jobs: services: couchdb: image: couchdb:2.2.0 + env: + COUCHDB_USER: admin + COUCHDB_PASSWORD: abc123 + ports: + - 5984:5984 test: strategy: matrix: From 7e68637c6569aadbcba898a0da12696b1294f68e Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:49:05 +0200 Subject: [PATCH 23/24] ports --- .github/workflows/test.yaml | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7be14982e..5e12b9375 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,35 +8,25 @@ env: COUCHDB_PASSWORD: abc123 jobs: - container-job: + test: + strategy: + matrix: + go-version: [1.22] # TODO: Add 1.23rc2 + name: test runs-on: ubuntu-latest - container: - image: node:16-bullseye services: couchdb: - image: couchdb:2.2.0 env: COUCHDB_USER: admin COUCHDB_PASSWORD: abc123 + image: couchdb:2.2.0 + options: >- + --health-cmd "curl -sSf http://localhost:5984/_up" + --health-interval 10s + --health-timeout 5s + --health-retries 5 ports: - 5984:5984 - test: - strategy: - matrix: - go-version: [1.22] # TODO: Add 1.23rc2 - name: test - runs-on: ubuntu-latest - # services: - # couchdb: - # env: - # COUCHDB_USER: admin - # COUCHDB_PASSWORD: abc123 - # image: couchdb:2.2.0 - # options: >- - # --health-cmd "curl -sSf http://localhost:5984/_up" - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 steps: - uses: actions/checkout@v4 - name: Set up Go From 936d6f4fa2f9c3e91736e81f3ffb552ba8f9272d Mon Sep 17 00:00:00 2001 From: Jonathan Hall Date: Mon, 22 Jul 2024 17:51:33 +0200 Subject: [PATCH 24/24] node18 --- .github/workflows/test.yaml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5e12b9375..fde00eebe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,25 +8,35 @@ env: COUCHDB_PASSWORD: abc123 jobs: - test: - strategy: - matrix: - go-version: [1.22] # TODO: Add 1.23rc2 - name: test + container-job: runs-on: ubuntu-latest + container: + image: node:18-bullseye services: couchdb: + image: couchdb:2.2.0 env: COUCHDB_USER: admin COUCHDB_PASSWORD: abc123 - image: couchdb:2.2.0 - options: >- - --health-cmd "curl -sSf http://localhost:5984/_up" - --health-interval 10s - --health-timeout 5s - --health-retries 5 ports: - 5984:5984 + test: + strategy: + matrix: + go-version: [1.22] # TODO: Add 1.23rc2 + name: test + runs-on: ubuntu-latest + # services: + # couchdb: + # env: + # COUCHDB_USER: admin + # COUCHDB_PASSWORD: abc123 + # image: couchdb:2.2.0 + # options: >- + # --health-cmd "curl -sSf http://localhost:5984/_up" + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 steps: - uses: actions/checkout@v4 - name: Set up Go