mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 02:24:55 +03:00
ce4c9fced5
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [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/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout 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>
85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
name: Elixir CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, stable]
|
|
pull_request:
|
|
branches: [master, stable]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and test
|
|
runs-on: buildjet-16vcpu-ubuntu-2204
|
|
|
|
strategy:
|
|
matrix:
|
|
postgres_version: [13, 14, 15]
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:${{ matrix.postgres_version }}
|
|
credentials:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME || '' }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN || '' }}
|
|
ports:
|
|
- 5432:5432
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:23.3.7.5-alpine
|
|
credentials:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME || '' }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN || '' }}
|
|
ports:
|
|
- 8123:8123
|
|
env:
|
|
options: >-
|
|
--health-cmd nc -zw3 localhost 8124
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Read .tool-versions
|
|
uses: marocchino/tool-versions-action@v1
|
|
id: versions
|
|
- name: Set up Elixir
|
|
uses: erlef/setup-beam@v1
|
|
with:
|
|
elixir-version: ${{steps.versions.outputs.elixir}}
|
|
otp-version: ${{ steps.versions.outputs.erlang}}
|
|
- name: Restore dependencies cache
|
|
uses: buildjet/cache@v3
|
|
with:
|
|
path: |
|
|
deps
|
|
_build
|
|
priv/plts
|
|
key: ${{ runner.os }}-mix-v5-${{ hashFiles('**/mix.lock') }}
|
|
restore-keys: ${{ runner.os }}-mix-v5-
|
|
- name: Install dependencies
|
|
run: mix deps.get && npm install --prefix ./tracker
|
|
- name: Check Formatting
|
|
run: mix format --check-formatted
|
|
- name: Check Compile Warnings
|
|
run: mix compile --warnings-as-errors --all-warnings
|
|
- name: Generate tracker files
|
|
run: npm run deploy --prefix ./tracker
|
|
- name: Check Credo Warnings
|
|
run: mix credo diff --from-git-merge-base origin/master
|
|
- name: Run tests
|
|
run: mix test --include slow --max-failures 1 --warnings-as-errors
|
|
- name: Check Dialyzer
|
|
run: mix dialyzer
|
|
env:
|
|
MIX_ENV: test
|