Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Update README.md

Update README.md #63

Workflow file for this run

name: Elixir CI
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
container:
image: hexpm/elixir:1.15.4-erlang-26.0.2-alpine-3.18.2
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
env:
MIX_ENV: test
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USERNAME: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
run: |
cp config/test.secret.ci.exs config/test.secret.exs
mix local.rebar --force
mix local.hex --force
apk add --update-cache build-base
mix deps.get
- name: Compile
env:
MIX_ENV: test
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USERNAME: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
run: mix compile --warnings-as-errors
- name: Run formatter
env:
MIX_ENV: test
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USERNAME: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
run: mix format --check-formatted
- name: Run Credo
env:
MIX_ENV: test
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USERNAME: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
run: mix credo
- name: Run Tests
env:
MIX_ENV: test
POSTGRES_HOST: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
POSTGRES_USERNAME: elixir_jobs
POSTGRES_PASSWORD: elixir_jobs
POSTGRES_DB: elixir_jobs_test
run: mix test