Make it work for embeds without ids #43
This file contains 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: CI | |
env: | |
ELIXIR_VERSION: "1.16" | |
OTP_VERSION: "26" | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} | |
strategy: | |
matrix: | |
include: | |
- { elixir: 1.15, otp: 24 } | |
- { elixir: 1.15, otp: 25 } | |
- { elixir: 1.15, otp: 26 } | |
- { elixir: 1.16, otp: 24 } | |
- { elixir: 1.16, otp: 25 } | |
- { elixir: 1.16, otp: 26 } | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
services: | |
postgres: | |
image: postgres:12-alpine | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Restore dependencies and build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
_build | |
deps | |
key: ${{ runner.os }}-otp-${{ steps.beam.outputs.otp-version }}-elixir-${{ steps.beam.outputs.elixir-version }}-mix-${{ hashFiles('mix.lock') }} | |
restore-keys: ${{ runner.os }}-otp-${{ steps.beam.outputs.otp-version }}-elixir-${{ steps.beam.outputs.elixir-version }}- | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Run Tests | |
run: mix coveralls.github | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
id: beam | |
with: | |
otp-version: ${{ env.OTP_VERSION }} | |
elixir-version: ${{ env.ELIXIR_VERSION}} | |
- name: Restore dependencies and build cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
_build | |
deps | |
key: ${{ runner.os }}-otp-${{ steps.beam.outputs.otp-version }}-elixir-${{ steps.beam.outputs.elixir-version }}-mix-${{ hashFiles('mix.lock') }} | |
restore-keys: ${{ runner.os }}-otp-${{ steps.beam.outputs.otp-version }}-elixir-${{ steps.beam.outputs.elixir-version }}- | |
- name: Restore PLT cache | |
uses: actions/cache@v4 | |
id: plt_cache | |
with: | |
key: | | |
${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-plt-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-plt- | |
path: | | |
.plts | |
- name: Install Dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Run Formatter | |
run: mix format --check-formatted | |
- name: Compile | |
run: mix compile --warnings-as-errors | |
# - name: Run Linter | |
# run: mix credo | |
- name: Run Hex Audit | |
run: mix hex.audit | |
- name: Generate docs | |
run: mix docs |