Files
archived-teslamate/.github/workflows/elixir_test.yml
dependabot[bot] 87589bf8f6 build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#4933)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-03 15:41:31 +02:00

57 lines
1.4 KiB
YAML

name: Elixir Test and report coverage
on:
workflow_call:
env:
CACHE_NAME_DEPS: cache-elixir-deps
CACHE_NAME_COMPILED_TEST: cache-compiled-test-build
ELIXIR_ASSERT_TIMEOUT: 1000
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-24.04
permissions:
contents: read
services:
db:
image: postgres:17
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Elixir and Cache Dependencies
id: setup-elixir-and-cache-deps
uses: ./.github/actions/setup-elixir-and-cache-deps
with:
cache-name-deps: ${{ env.CACHE_NAME_DEPS }}
cache-name-compiled: ${{ env.CACHE_NAME_COMPILED_TEST }}
mix-env: test
ELIXIR_ASSERT_TIMEOUT: ${{ env.ELIXIR_ASSERT_TIMEOUT }}
- name: Compile without warnings
run: mix compile --warnings-as-errors
shell: sh
- name: Run tests
run: mix test --warnings-as-errors
- name: Check Coverage
if: github.ref == 'refs/heads/main'
run: mix coveralls.github
continue-on-error: true
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}