Skip to content

setup transaction filter #1487

setup transaction filter

setup transaction filter #1487

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OTP_VERSION: 26.x.x
ELIXIR_VERSION: 1.15.x
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
MIX_ENV: test
services:
db:
image: postgres:11
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Cache Deps
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Cache Build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-build-
- run: mix do deps.get, compile --warnings-as-errors, ecto.reset
- run: mix coveralls.json
- name: Check Code Coverage
uses: coverbot-io/coverbot-action@v1
with:
file: cover/excoveralls.json
coverbot_api_key: ${{ secrets.COVERBOT_API_KEY}}
github_token: ${{ secrets.GITHUB_TOKEN}}
format:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Cache Deps
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Cache Build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-build-
- run: mix do deps.get, compile
- run: mix format --check-formatted
credo:
name: Credo
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- name: Cache Deps
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Cache Build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-build-
- run: mix do deps.get, compile
- run: mix credo