Skip to content

Format MBLD results below 1 minute more clearly (#223) #345

Format MBLD results below 1 minute more clearly (#223)

Format MBLD results below 1 minute more clearly (#223) #345

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test_client:
name: Client
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Cache npm dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
# TODO: remove --legacy-peer-deps once we can install without it
run: npm ci --legacy-peer-deps
- name: Check formatting
run: npm run format-check
- name: Check linter
run: npm run lint
- name: Run tests
run: npm test
test_server:
name: Server
runs-on: ubuntu-latest
env:
MIX_ENV: test
services:
postgres:
image: postgres:12.4
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
- name: Install Erlang & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: '26.0.2'
elixir-version: '1.15.2'
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install wkhtmltopdf
- name: Cache Mix
uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-
- name: Install mix dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Check warnings
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test