Skip to content

Remove redundant Linux ARM64 job #17

Remove redundant Linux ARM64 job

Remove redundant Linux ARM64 job #17

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
MIX_ENV: test
ELIXIR_VERSION: "1.18.4"
OTP_VERSION: "27.2"
jobs:
test:
name: Test (Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}})
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ["1.18.4", "1.19.1"]
otp: ["27.2", "28.1"]
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
env:
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
ports:
- 9000:9000
- 8123:8123
options: >-
--health-cmd "clickhouse-client --query 'SELECT 1'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Install system dependencies
run: |
sudo apt-get install -y build-essential cmake libssl-dev
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-
- name: Install dependencies
run: mix deps.get
- name: Compile
run: mix compile --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted
- name: Run tests
run: mix test --exclude integration
env:
CLICKHOUSE_HOST: localhost
CLICKHOUSE_PORT: 9000
valgrind:
name: Memory Leak Check (Valgrind)
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
env:
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
ports:
- 9000:9000
- 8123:8123
options: >-
--health-cmd "clickhouse-client --query 'SELECT 1'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Docker image for valgrind
run: docker build -f Dockerfile.valgrind -t chex-valgrind .
- name: Run valgrind tests
run: |
docker run --rm \
--network host \
chex-valgrind 2>&1 | tee valgrind_output.txt
- name: Check for memory leaks
run: |
if grep -q "definitely lost:" valgrind_output.txt; then
echo "❌ Memory leaks detected!"
grep "definitely lost:" valgrind_output.txt
exit 1
else
echo "✅ No memory leaks detected"
fi
- name: Upload valgrind report
if: always()
uses: actions/upload-artifact@v4
with:
name: valgrind-report
path: valgrind_output.txt
retention-days: 7