Skip to content

Use ExMachina and Faker for Test Factories (#6) #11

Use ExMachina and Faker for Test Factories (#6)

Use ExMachina and Faker for Test Factories (#6) #11

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
MIX_ENV: test
permissions:
contents: read
jobs:
test:
name: Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
otp:
- '26.2.4'
elixir:
- '1.16.2'
services:
db:
image: postgres
env:
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Erlang/Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache deps
uses: actions/cache@v3
id: cache-deps
env:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
- name: Install Dependencies
run: mix deps.get
- name: Compile
run: mix compile --warnings-as-errors
- name: Run Linter
run: mix lint.ci
- name: Run Tests
run: mix coveralls.json
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: DashFloat/DashFloat