Skip to content

fix(sync-service): fix enum params in subsets #4757

fix(sync-service): fix enum params in subsets

fix(sync-service): fix enum params in subsets #4757

name: Elixir Client CI
on:
push:
branches: ['main']
paths-ignore:
- 'website/**'
- '**/README.md'
pull_request:
paths-ignore:
- 'website/**'
- '**/README.md'
permissions:
contents: read
jobs:
build_and_test:
name: Build and test elixir-client
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/elixir-client
env:
MIX_ENV: test
MIX_OS_DEPS_COMPILE_PARTITION_COUNT: 4
POSTGRES_VERSION: 140006
ELECTRIC_PORT: 3100
PG_PORT: 54323
ELECTRIC_URL: 'http://127.0.0.1:3333'
DATABASE_URL: 'postgresql://postgres:[email protected]:54323/postgres?sslmode=disable'
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54323:5432
steps:
- uses: actions/checkout@v4
- name: 'Set PG settings'
run: |
docker exec ${{ job.services.postgres.id }} sh -c 'echo "wal_level=logical" >> /var/lib/postgresql/data/postgresql.conf'
docker restart ${{ job.services.postgres.id }}
- uses: erlef/setup-beam@v1
with:
version-type: strict
version-file: '.tool-versions'
- name: Cache elixir-client dependencies
uses: actions/cache@v4
with:
path: packages/elixir-client/deps
key: ${{ runner.os }}-elixir-client-deps-${{ hashFiles('packages/elixir-client/mix.lock') }}
restore-keys: |
${{ runner.os }}-elixir-client-deps-${{ hashFiles('packages/elixir-client/mix.lock') }}
${{ runner.os }}-elixir-client-deps-
- name: Cache elixir-client compiled code
uses: actions/cache@v4
with:
path: |
packages/elixir-client/_build/*/lib
!packages/elixir-client/_build/*/lib/electric_client
key: "${{ runner.os }}-elixir-client-build-${{ env.MIX_ENV }}-${{ hashFiles('packages/elixir-client/mix.lock') }}"
restore-keys: |
${{ runner.os }}-elixir-client-build-${{ env.MIX_ENV }}-${{ hashFiles('packages/elixir-client/mix.lock') }}
${{ runner.os }}-elixir-client-build-${{ env.MIX_ENV }}-
${{ runner.os }}-elixir-client-build-
- name: Install dependencies
run: mix do deps.get + deps.compile
- name: Compile
# don't bail on compile warnings - let's get the results of the tests
# and let the formatting task check for compilation warnings
run: mix compile
- name: Run tests
run: mix coveralls.json
- name: Upload coverage reports to CodeCov
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: elixir,unit-tests,elixir-client
files: ./cover/excoveralls.json
- name: Upload test results to CodeCov
uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706
if: ${{ !cancelled() }}
env:
DUMMY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}-dummy
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: elixir,unit-tests,elixir-client
files: ./junit/test-junit-report.xml
# Upload all PR test results to single branch - requires overriding branch and commit
override_branch: ${{ github.event_name == 'pull_request' && 'codecov/pr-test-aggregation' || '' }}
override_commit: ${{ github.event_name == 'pull_request' && env.DUMMY_COMMIT_SHA || '' }}