Skip to content

Upload Updates (#7) #24

Upload Updates (#7)

Upload Updates (#7) #24

Workflow file for this run

name: Build
on: [push]
jobs:
build:
name: Elixir ${{matrix.elixir}} - OTP ${{matrix.otp}}
runs-on: ubuntu-latest
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
elixir:
- "1.16.1"
otp:
- "26.2.2"
services:
fake-s3:
image: lphoward/fake-s3
ports: ["4569:4569"]
postgres:
image: postgres:16
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: upload_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Dependencies
run: mix deps.get
- name: Compile
run: mix compile --force --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted
- name: Credo
run: mix credo
- name: Test
run: mix test
- name: Cache dialyzer
uses: actions/cache@v2
with:
path: priv/plts
key: plts-${{ matrix.elixir }}
- name: Dialyzer
run: MIX_ENV=dev mix dialyzer