mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8) Signed-off-by: dependabot[bot] <support@github.com>
61 lines
1.6 KiB
YAML
61 lines
1.6 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.1"
|
|
otp: "23.x"
|
|
|
|
runs-on: ubuntu-18.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: actions/setup-elixir@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'
|
|
run: mix coveralls.github
|
|
continue-on-error: true
|