diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5b881..f64799f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,89 +10,89 @@ on: - '**.md' jobs: - go-mod-tidy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Go mod tidy - run: | - go mod tidy - git diff --exit-code -- go.mod go.sum + # go-mod-tidy: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Go mod tidy + # run: | + # go mod tidy + # git diff --exit-code -- go.mod go.sum go-versions: uses: ./.github/workflows/go-versions.yml - # Runs the common tasks (unit tests, lint, contract tests) for each Go version. - test-linux: - name: ${{ format('Linux, Go {0}', matrix.go-version) }} - needs: go-versions - strategy: - # Let jobs fail independently, in case it's a single version that's broken. - fail-fast: false - matrix: - go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} - uses: ./.github/workflows/common_ci.yml - with: - go-version: ${{ matrix.go-version }} - - test-linux-redis-cluster: - name: ${{ format('Linux, Go {0} with Redis Cluster', matrix.go-version) }} - runs-on: ubuntu-latest - env: - LD_TEST_REDIS_ADDRESSES: redis-node1:6379 redis-node2:6379 redis-node3:6379 - needs: go-versions - strategy: - fail-fast: false - matrix: - go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} - services: - redis-node1: - image: bitnami/redis-cluster:latest - env: - ALLOW_EMPTY_PASSWORD: yes - REDIS_NODES: redis-node1 redis-node2 redis-node3 - REDIS_CLUSTER_REPLICAS: 0 - - - redis-node2: - image: bitnami/redis-cluster:latest - env: - ALLOW_EMPTY_PASSWORD: yes - REDIS_NODES: redis-node1 redis-node2 redis-node3 - REDIS_CLUSTER_REPLICAS: 0 - - - redis-node3: - image: bitnami/redis-cluster:latest - env: - ALLOW_EMPTY_PASSWORD: yes - REDIS_NODES: redis-node1 redis-node2 redis-node3 - REDIS_CLUSTER_REPLICAS: 0 - - - redis-cluster-init: - image: bitnami/redis-cluster:latest - env: - ALLOW_EMPTY_PASSWORD: yes - REDIS_CLUSTER_CREATOR: yes - REDIS_NODES: redis-node1 redis-node2 redis-node3 - REDIS_CLUSTER_REPLICAS: 0 - - container: - image: ubuntu:22.04 - steps: - - uses: actions/checkout@v4 - - name: Setup Go ${{ matrix.go-version }} - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Deps - run: | - apt-get update - apt-get install -y make curl gcc - - uses: ./.github/actions/unit-tests - with: - upload-results: 'false' + # # Runs the common tasks (unit tests, lint, contract tests) for each Go version. + # test-linux: + # name: ${{ format('Linux, Go {0}', matrix.go-version) }} + # needs: go-versions + # strategy: + # # Let jobs fail independently, in case it's a single version that's broken. + # fail-fast: false + # matrix: + # go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} + # uses: ./.github/workflows/common_ci.yml + # with: + # go-version: ${{ matrix.go-version }} + # + # test-linux-redis-cluster: + # name: ${{ format('Linux, Go {0} with Redis Cluster', matrix.go-version) }} + # runs-on: ubuntu-latest + # env: + # LD_TEST_REDIS_ADDRESSES: redis-node1:6379 redis-node2:6379 redis-node3:6379 + # needs: go-versions + # strategy: + # fail-fast: false + # matrix: + # go-version: ${{ fromJSON(needs.go-versions.outputs.matrix) }} + # services: + # redis-node1: + # image: bitnami/redis-cluster:latest + # env: + # ALLOW_EMPTY_PASSWORD: yes + # REDIS_NODES: redis-node1 redis-node2 redis-node3 + # REDIS_CLUSTER_REPLICAS: 0 + # + # + # redis-node2: + # image: bitnami/redis-cluster:latest + # env: + # ALLOW_EMPTY_PASSWORD: yes + # REDIS_NODES: redis-node1 redis-node2 redis-node3 + # REDIS_CLUSTER_REPLICAS: 0 + # + # + # redis-node3: + # image: bitnami/redis-cluster:latest + # env: + # ALLOW_EMPTY_PASSWORD: yes + # REDIS_NODES: redis-node1 redis-node2 redis-node3 + # REDIS_CLUSTER_REPLICAS: 0 + # + # + # redis-cluster-init: + # image: bitnami/redis-cluster:latest + # env: + # ALLOW_EMPTY_PASSWORD: yes + # REDIS_CLUSTER_CREATOR: yes + # REDIS_NODES: redis-node1 redis-node2 redis-node3 + # REDIS_CLUSTER_REPLICAS: 0 + # + # container: + # image: ubuntu:22.04 + # steps: + # - uses: actions/checkout@v4 + # - name: Setup Go ${{ matrix.go-version }} + # uses: actions/setup-go@v5 + # with: + # go-version: ${{ matrix.go-version }} + # - name: Deps + # run: | + # apt-get update + # apt-get install -y make curl gcc + # - uses: ./.github/actions/unit-tests + # with: + # upload-results: 'false' @@ -111,13 +111,20 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} - - name: Install Redis - shell: powershell - # The process needs to be started with Start-Process, which creates a new process independent - # of this shell. That way it can run in the background when we move on to the Go test step. - run: | - choco install redis - Start-Process redis-server + - uses: launchdarkly/gh-actions/actions/persistent-stores@3a30a506b7e2c38c5a9ece2c7d4fafe3c9b726a7 + with: + redis: true + consul: true + dynamodb: true - name: Test run: go test -count=1 -race ./... + + test-macos: + runs-on: macos-latest + steps: + - uses: launchdarkly/gh-actions/actions/persistent-stores@3a30a506b7e2c38c5a9ece2c7d4fafe3c9b726a7 + with: + redis: true + consul: true + dynamodb: true