feat: add ability to disable signups (#78) #218
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: CI | |
on: | |
pull_request: | |
push: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
services: | |
postgres: | |
image: postgres:13.2-alpine | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_DB: shroud_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/[email protected] | |
with: | |
elixir-version: "1.14.2" | |
otp-version: "25.2" | |
version-type: "strict" | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Compile dependencies | |
run: mix deps.compile | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Run linter | |
run: mix credo | |
- name: Check warnings | |
run: mix compile --warnings-as-errors | |
- name: Setup database | |
run: mix ecto.setup | |
- name: Run tests | |
run: mix coveralls.json | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./cover/excoveralls.json |