Skip to content

Try to fix tests not passing on CI #4

Try to fix tests not passing on CI

Try to fix tests not passing on CI #4

Workflow file for this run

name: Elixir CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
RUSTLER_PRECOMPILATION_PACT_EX_BUILD: true
RUSTLER_PACT_EX_MODE: debug
MIX_ENV: test
jobs:
test:
strategy:
matrix:
include:
- otp_version: "26.2.5"
elixir_version: 1.17
runs-on: ubuntu-20.04
name: test
services:
postgres:
image: postgres
volumes:
- postgres-volume:/var/lib/postgresql/data
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
pact-broker:
image: pactfoundation/pact-broker:latest
env:
PACT_BROKER_PORT: '9292'
PACT_BROKER_DATABASE_URL: "postgres://postgres:password@postgres/postgres"
ports:
- 9292:9292
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
_build/test/lib/pact_ex/native/pact_ex
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: test-native-${{ runner.os }}-${{ hashFiles('native/**/Cargo.lock') }}
restore-keys: |
test-native-${{ runner.os }}
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
elixir-version: ${{ matrix.elixir_version }}
- run: mix deps.get
- run: mix deps.compile
- name: Run tests
run: mix test --warnings-as-errors --include requires_broker
format:
runs-on: ubuntu-20.04
name: mix format
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: "26.2.1"
elixir-version: 1.16
- run: mix format --check-formatted