This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
Update README.md #64
Workflow file for this run
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: 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 |