feat: upgrade devbox install action #79
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: [push, pull_request] | |
jobs: | |
static-analysis: | |
name: Static Analysis | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13-alpine | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: gatherly_dev | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install devbox | |
uses: jetify-com/[email protected] | |
with: | |
enable_cache: "true" | |
- name: Check Format | |
run: devbox run check_format | |
- name: Run tests | |
run: devbox run postgres; devbox run coverage | |
env: | |
MIX_ENV: test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
deploy: | |
name: Deploy app | |
needs: static-analysis | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install devbox | |
uses: jetify-com/[email protected] | |
with: | |
enable_cache: "true" | |
- run: devbox run deploy | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |