Skip to content

Feat/cloud run deploy #1

Feat/cloud run deploy

Feat/cloud run deploy #1

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
env:
MIX_ENV: test
ELIXIR_VERSION: "1.18.4"
OTP_VERSION: "28.0.2"
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ksef_hub_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.OTP_VERSION }}
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: mix-${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('mix.lock') }}
restore-keys: |
mix-${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-
- name: Install dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Compile (warnings as errors)
run: mix compile --warnings-as-errors
- name: Run Credo
run: mix credo --strict
- name: Run tests
run: mix test
env:
DATABASE_URL: ecto://postgres:postgres@localhost/ksef_hub_test