Move to phoenix 1.7 non-umbrella setup #59
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: test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
# services: | |
# postgres: | |
# image: postgres:12 | |
# ports: | |
# - 5432:5432 | |
# env: | |
# POSTGRES_USER: postgres | |
# POSTGRES_PASSWORD: postgres | |
# # Set health checks to wait until postgres has started | |
# options: >- | |
# --health-cmd pg_isready | |
# --health-interval 10s | |
# --health-timeout 5s | |
# --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-mix-deps | |
- uses: actions/cache@v1 | |
with: | |
path: _build | |
key: ${{ runner.os }}-mix-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
restore-keys: | | |
${{ runner.os }}-mix-build | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 25.3 | |
elixir-version: 1.15.4 | |
- run: mix deps.get --only test | |
- run: mix compile --warnings-as-errors | |
- run: mix test | |
deploy: | |
if: github.event_name == 'push' | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: master # Checkout out master instead of the latest commit | |
fetch-depth: 0 # Checkout the whole branch | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- uses: mhanberg/[email protected] | |
with: | |
GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }} | |
GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }} | |
GIGALIXIR_APP: ${{ secrets.GIGALIXIR_APP }} | |
MIGRATIONS: false # defaults to true |