Skip to content

Merge pull request #16 from qdentity/phoenix_html-4.0 #74

Merge pull request #16 from qdentity/phoenix_html-4.0

Merge pull request #16 from qdentity/phoenix_html-4.0 #74

Workflow file for this run

name: MJML EEx CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELL: sh
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.13.3'
otp-version: '24.2'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Install dependencies
run: mix deps.get
- name: Restore PLT cache
uses: actions/cache@v2
with:
path: priv/plts
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Mix Formatter
run: mix format --check-formatted
- name: Check for compiler warnings
run: mix compile --warnings-as-errors
- name: Credo strict checks
run: mix credo --strict
- name: Doctor documentation checks
run: mix doctor
unit_test:
name: Run ExUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
elixir:
- '1.13.3'
otp:
- '24.2'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 15
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Install dependencies
run: mix deps.get
- name: Install Node MJML compiler
run: npm install -g mjml
- name: Set MJML path env var
run: echo "$(npm bin)" >> $GITHUB_PATH
- name: ExUnit tests
env:
MIX_ENV: test
SHELL: /bin/bash
run: mix coveralls.github