first commit #1
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: expense_pilot_test | |
| options: >- | |
| --health-cmd "pg_isready -U postgres" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| env: | |
| MIX_ENV: test | |
| DATABASE_URL: ecto://postgres:postgres@localhost:5432/expense_pilot_test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: '1.16.1' | |
| otp-version: '26.2.1' | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Setup database and seed | |
| run: mix ecto.create && mix ecto.migrate && mix run priv/repo/seeds.exs | |
| - name: Run tests | |
| run: mix test |