Merge pull request #47 from emqx/codex/update-eredis-1.2.17 #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run test suites | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| erlang: | |
| - otp: "27" | |
| rebar3: "3.24" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.erlang.otp }} | |
| rebar3-version: ${{ matrix.erlang.rebar3 }} | |
| - name: pull redis image | |
| run: | | |
| source .env | |
| if docker pull public.ecr.aws/docker/library/redis:${REDIS_TAG}; then | |
| docker tag public.ecr.aws/docker/library/redis:${REDIS_TAG} eredis-cluster-redis:${REDIS_TAG} | |
| else | |
| docker pull redis:${REDIS_TAG} | |
| docker tag redis:${REDIS_TAG} eredis-cluster-redis:${REDIS_TAG} | |
| fi | |
| echo "REDIS_IMAGE=eredis-cluster-redis" >> "$GITHUB_ENV" | |
| - name: setup redis cluster | |
| run: docker compose up -d --wait | |
| - name: eunit | |
| run: rebar3 eunit -v -c | |
| - name: cover report | |
| run: rebar3 cover -v | |
| - name: upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cover-rebar3_${{ matrix.erlang.rebar3 }}-otp_${{ matrix.erlang.otp }} | |
| path: _build/test/cover | |
| - name: teardown redis cluster | |
| if: always() | |
| run: docker compose down || true |