Skip to content

ci: Remove PR-IS-WIP because it's broken #169

ci: Remove PR-IS-WIP because it's broken

ci: Remove PR-IS-WIP because it's broken #169

Workflow file for this run

name: Elixir CI
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
timeout-minutes: 10
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
GH_PERSONNAL_TOKEN: ${{secrets.GH_PERSONNAL_TOKEN}}
services:
postgres:
# Docker Hub image
image: postgres:13.6-alpine
# Provide the password for postgres
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
ports:
# Maps tcp port 5432 on service container to the host (localhost)
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Elixir
uses: erlef/setup-beam@v1
id: beam
with:
elixir-version: "1.13" # Define the elixir version [required]
otp-version: "24" # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: MIX_ENV=test mix deps.get
- name: Compile project
run: MIX_ENV=test mix compile
- name: Check formatting
run: mix format --check-formatted
- name: Check code style with credo
run: mix credo --strict
- name: Run tests
run: mix test
- name: Run dialyzer
run: mix dialyzer --format short