FOSSA Scan - Do Not Merge #428
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
unit_test: | |
name: Unit Tests - Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} | |
runs-on: ubuntu-20.04 | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
- elixir: '1.15' | |
otp: '26' | |
- elixir: '1.15' | |
otp: '25' | |
- elixir: '1.14' | |
otp: '26' | |
- elixir: '1.13' | |
otp: '25' | |
- elixir: '1.12' | |
otp: '24' | |
- elixir: '1.11' | |
otp: '23' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore deps cache | |
uses: actions/cache@v2 | |
with: | |
path: deps | |
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | |
restore-keys: | | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Restore _build cache | |
uses: actions/cache@v2 | |
with: | |
path: _build | |
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | |
restore-keys: | | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Install deps | |
run: mix deps.get | |
- name: Check Formatting | |
run: mix format --check-formatted | |
- name: Compile application | |
run: mix compile | |
env: | |
MIX_ENV: test | |
- name: Run unit tests | |
run: | | |
set +e | |
mix test | |
set -e | |
mix test --trace --failed | |
integration_test: | |
name: Integration Tests - Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}} | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
- elixir: '1.15' | |
otp: '26' | |
- elixir: '1.14' | |
otp: '26' | |
- elixir: '1.13' | |
otp: '25' | |
- elixir: '1.12' | |
otp: '24' | |
defaults: | |
run: | |
working-directory: examples | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Restore deps cache | |
uses: actions/cache@v3 | |
with: | |
path: examples/deps | |
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | |
restore-keys: | | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Restore _build cache | |
uses: actions/cache@v3 | |
with: | |
path: examples/_build | |
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ github.sha }} | |
restore-keys: | | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }} | |
- name: Install deps | |
run: mix deps.get | |
- name: Check Formatting | |
run: mix format --check-formatted | |
- name: Compile application | |
run: | | |
mix compile | |
env: | |
MIX_ENV: test | |
- name: Start integration test dependencies | |
run: | | |
docker-compose up -d | |
until pg_isready -h localhost; do sleep 1; done; | |
until mysqladmin --protocol tcp ping; do sleep 1; done; | |
- name: Run integration tests | |
run: | | |
mix test | |
mix instrumented_task | |
mix uninstrumented_task | |
env: | |
MIX_ENV: test |