mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
mix_test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- pair:
|
|
elixir: "1.12"
|
|
otp: "24"
|
|
report_coverage: true
|
|
lint: true
|
|
|
|
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@v3
|
|
- uses: erlef/setup-beam@v1.10
|
|
with:
|
|
otp-version: ${{ matrix.pair.otp }}
|
|
elixir-version: ${{ matrix.pair.elixir }}
|
|
- uses: actions/cache@v2.1.7
|
|
with:
|
|
path: |
|
|
deps
|
|
_build
|
|
priv/cldr/locales
|
|
key: ${{ runner.os }}-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
|
restore-keys: |
|
|
${{ runner.os }}-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-mix-
|
|
- name: Install Dependencies
|
|
run: mix deps.get
|
|
- name: Check Formatting
|
|
run: mix format --check-formatted
|
|
if: ${{ matrix.lint }}
|
|
- name: Check unused dependencies
|
|
run: mix deps.unlock --check-unused
|
|
if: ${{ matrix.lint }}
|
|
- name: Compile dependencies
|
|
run: mix deps.compile
|
|
- name: Check for compilation warnings
|
|
run: mix compile --warnings-as-errors
|
|
if: ${{ matrix.lint }}
|
|
- name: Verify that POT files are up to date
|
|
run: mix gettext.extract --check-up-to-date
|
|
if: ${{ matrix.lint }}
|
|
- 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
|