Shutdown notice #2033
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: Elixir CI | |
env: | |
MIX_ENV: test | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: glimesh_test | |
ports: ['5432:5432'] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install rsvg-convert for emotes | |
run: sudo apt-get install librsvg2-bin | |
- name: Install svgo for emotes | |
run: sudo npm -g install svgo@2.8.0 | |
- name: Set up Elixir | |
uses: erlef/setup-elixir@v1 | |
with: | |
elixir-version: '1.13.4' | |
otp-version: '24' | |
- name: Restore dependencies cache | |
uses: actions/cache@v2 | |
id: mix-cache | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Restore build cache | |
uses: actions/cache@v2 | |
id: build-cache | |
with: | |
path: _build | |
key: ${{ runner.os }}-build-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-build- | |
- name: Install dependencies | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Compile Dependencies | |
if: steps.build-cache.outputs.cache-hit != 'true' | |
run: MIX_ENV=test mix compile | |
- name: Start stripe-mock | |
run: docker run -d -p 12111-12112:12111-12112 stripemock/stripe-mock && sleep 5 | |
- name: Run tests | |
run: mix test | |
- name: Code Quality | |
run: mix code_quality | |
- name: Ensure formatted | |
run: mix format --check-formatted | |
- name: Code Coverage | |
run: mix coveralls.github | |
# Sometimes Coveralls throws a 500 error, preventing us from being able to push code. | |
# Coverage is important, but not important enough to hold back a merge :) | |
continue-on-error: true |