Skip to content

Bump phoenix from 1.6.15 to 1.7.8 #212

Bump phoenix from 1.6.15 to 1.7.8

Bump phoenix from 1.6.15 to 1.7.8 #212

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
ELIXIR_VERISON: 1.11.3
OTP_VERSION: 23.2
MIX_ENV: test
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/elixir_formula_test
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
jobs:
build:
name: Build Stage
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ env.ELIXIR_VERISON }}
otp-version: ${{ env.OTP_VERSION }}
- name: Retrieve Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERISON }}-${{ hashFiles('mix.lock') }}
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
linter:
name: Linter Stage
needs: build
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ env.ELIXIR_VERISON }}
otp-version: ${{ env.OTP_VERSION }}
- name: Retrieve Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERISON }}-${{ hashFiles('mix.lock') }}
- name: Check Formatting
run: mix format --check-formatted
- name: Run Credo
run: mix credo --strict
unit_tests:
name: Unit Tests Stage
needs: build
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.1
env:
POSTGRES_DB: elixir_formula_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options:
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ env.ELIXIR_VERISON }}
otp-version: ${{ env.OTP_VERSION }}
- name: Retrieve Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERISON }}-${{ hashFiles('mix.lock') }}
- name: Run Tests
run: |
mix ecto.setup
mix coveralls.github
env:
GITHUB_TOKEN: ${{ github.token }}