Skip to content

allow string names in field/2 #1729

allow string names in field/2

allow string names in field/2 #1729

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
name: unittest
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.17.2
otp: 25.0.4
- elixir: 1.17.2
otp: 27.0.1
lint: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Elixir and Erlang
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps and _build cache
uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-
- name: Install dependencies
run: mix deps.get
- name: Check unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: Check formatting
run: mix format --check-formatted
if: ${{ matrix.lint }}
- name: Compile
run: mix compile
- name: Run tests
run: mix test
test-postgres:
name: postgres integration test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
elixirbase:
- "1.11.4-erlang-23.3.4.9-alpine-3.16.9"
postgres:
- "16.2-alpine"
- "11.11-alpine"
- "9.6-alpine"
- "9.5-alpine"
pool_count:
- "1"
include:
- elixirbase: "1.11.4-erlang-23.3.4.9-alpine-3.16.9"
postgres: "16.2-alpine"
pool_count: "4"
steps:
- uses: earthly/actions-setup@v1
- uses: actions/checkout@v3
- name: test ecto_sql
env:
POOL_COUNT: ${{ matrix.pool_count || '1' }}
run: earthly -P --ci --build-arg ELIXIR_BASE=${{matrix.elixirbase}} --build-arg POSTGRES=${{matrix.postgres}} +integration-test-postgres
test-mysql:
name: mysql integration test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
elixirbase:
- "1.11.4-erlang-23.3.4.9-alpine-3.16.9"
mysql:
- "5.7"
- "8.0"
steps:
- uses: earthly/actions-setup@v1
- uses: actions/checkout@v3
- name: test ecto_sql
run: earthly -P --ci --build-arg ELIXIR_BASE=${{matrix.elixirbase}} --build-arg MYSQL=${{matrix.mysql}} +integration-test-mysql
test-mssql:
name: mssql integration test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
elixirbase:
- "1.11.4-erlang-23.3.4.9-alpine-3.16.9"
mssql:
- "2017"
- "2019"
steps:
- uses: earthly/actions-setup@v1
- uses: actions/checkout@v3
- name: test ecto_sql
run: earthly -P --ci --build-arg ELIXIR_BASE=${{matrix.elixirbase}} --build-arg MSSQL=${{matrix.mssql}} +integration-test-mssql