Align with plausible/analytics #707
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: mix | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
strategy: | |
matrix: | |
elixir: [1.14, 1.15, 1.16] | |
otp: [25, 26] | |
clickhouse: [latest] | |
timezone: [UTC] | |
include: | |
- elixir: 1.17 | |
otp: 27 | |
clickhouse: latest | |
timezone: Europe/Berlin | |
- elixir: 1.17 | |
otp: 27 | |
clickhouse: latest | |
timezone: UTC | |
# Plausible | |
# - https://github.com/plausible/analytics/blob/master/.tool-versions | |
# - https://github.com/plausible/analytics/blob/master/.github/workflows/elixir.yml | |
- elixir: 1.17.1 | |
otp: 27.0 | |
clickhouse: 24.3.3.102 | |
timezone: UTC | |
services: | |
clickhouse: | |
image: clickhouse/clickhouse-server:${{ matrix.clickhouse }} | |
ports: | |
- 8123:8123 | |
env: | |
TZ: ${{ matrix.timezone }} | |
options: >- | |
--health-cmd nc -zw3 localhost 8124 | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
deps | |
_build | |
key: test-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
test-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}- | |
test-${{ matrix.otp }}-${{ matrix.elixir }}-refs/heads/master- | |
- run: mix deps.get --only $MIX_ENV | |
- run: mix compile --warnings-as-errors | |
- run: mix test --include slow | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: 1 | |
otp-version: 27 | |
- run: elixir -v | |
- run: mix format --check-formatted |