Skip to content

format code and add formatter to ci #127

format code and add formatter to ci

format code and add formatter to ci #127

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
env:
POSTGRES_DB: epicenter_test
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
matrix:
postgres-version: [16.4-alpine]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
version-type: strict
- name: Install dependencies
run: |
npm install --prefix assets
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.unlock --check-unused
mix deps.audit
npm audit --audit-level=moderate --prefix assets
mix sobelow --config
- name: Run mix format
run: mix format --check-formatted
- name: Run tests
run: bin/dev/test
env:
CANONICAL_HOST: localhost
LIVE_VIEW_SIGNING_SALT: mZT0Lo72e+U9KLtsTQzdKmmxpda0uuJJlMWTzJYdFBhddwbGbAC3h5T1QusYBhBr
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
SECRET_KEY_BASE: iuJS3FLMrRqbKug/CE4zGGd31eY6FMdmpQGjy8RMaQoxk59wAvSxuUKM6c/uaOo4