Files
archived-hipudding-teslamate/.github/workflows/elixir.yml
Adrian Kumpf 6cfb2a24cf Revert "postgres to alpine and runs on to latest ubuntu (#1576)"
This reverts commit 6050dc53f3.

The alpine images don't work on the Raspberry Pi because its package
sources contains an old version of libseccomp, which causes the time to
be at 1970: https://github.com/docker-library/postgres/issues/812
2021-05-03 16:39:49 +02:00

64 lines
1.7 KiB
YAML

name: CI
on: [pull_request, push]
jobs:
mix_test:
name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }})
strategy:
matrix:
include:
- elixir: "1.11.4"
otp: "23.x"
report_coverage: true
- elixir: "1.12.0-rc.1"
otp: "24.0-rc3"
runs-on: ubuntu-20.04
services:
db:
image: postgres:13
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MIX_ENV: test
ELIXIR_ASSERT_TIMEOUT: 1000
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.5
with:
path: |
deps
_build
priv/cldr/locales
key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Install Dependencies
run: mix do deps.get, compile
- name: Check Formatting
run: mix format --check-formatted
- name: Check unused dependencies
run: mix deps.unlock --check-unused
- name: Run Tests
run: mix test
- name: Check Coverage
if: github.ref == 'refs/heads/master' && matrix.report_coverage
run: mix coveralls.github
continue-on-error: true