diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 7ab1752..995235b 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -3,15 +3,21 @@ name: bench on: workflow_dispatch jobs: - mix: + benchee: runs-on: ubuntu-latest env: MIX_ENV: bench + strategy: + matrix: + elixir: ["1.16"] + otp: ["26"] + clickhouse: ["latest"] + services: clickhouse: - image: clickhouse/clickhouse-server:23.3.7.5-alpine + image: clickhouse/clickhouse-server:${{ matrix.clickhouse }} ports: - 8123:8123 env: @@ -26,21 +32,20 @@ jobs: - uses: erlef/setup-beam@v1 with: - elixir-version: "1.16" - otp-version: "26" + elixir-version: ${{ matrix.elixir }} + otp-version: ${{ matrix.otp }} - uses: actions/cache@v3 with: path: | deps _build - key: bench-ref-${{ github.head_ref || github.ref }}-mix-${{ hashFiles('**/mix.lock') }} + key: bench-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}-${{ hashFiles('**/mix.lock') }} restore-keys: | - bench-ref-${{ github.head_ref || github.ref }}-mix- - bench-ref-refs/heads/master-mix- + bench-${{ matrix.otp }}-${{ matrix.elixir }}-${{ github.head_ref || github.ref }}- + bench-${{ matrix.otp }}-${{ matrix.elixir }}-refs/heads/master- - run: mix deps.get --only $MIX_ENV - - run: mix format --check-formatted - run: mix compile --warnings-as-errors - run: mkdir results - run: mix run bench/insert.exs | tee results/insert.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8cc85b5..b2fafaf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: mix on: pull_request: @@ -6,7 +6,7 @@ on: branches: [master] jobs: - mix: + test: runs-on: ubuntu-latest env: @@ -16,17 +16,24 @@ jobs: matrix: elixir: ["1.14", "1.15", "1.16"] otp: ["25", "26"] - clickhouse: ["23.3.7.5"] + clickhouse: ["latest"] timezone: ["UTC"] include: - elixir: "1.16" otp: "26" - clickhouse: "23.3.7.5" + clickhouse: "latest" timezone: "Europe/Berlin" + # Plausible + # - https://github.com/plausible/analytics/blob/master/.tool-versions + # - https://github.com/plausible/analytics/blob/master/.github/workflows/elixir.yml + - elixir: "1.16.0" + otp: "26.2.1" + clickhouse: "23.3.7.5" + timezone: "UTC" services: clickhouse: - image: clickhouse/clickhouse-server:${{ matrix.clickhouse }}-alpine + image: clickhouse/clickhouse-server:${{ matrix.clickhouse }} ports: - 8123:8123 env: @@ -59,3 +66,14 @@ jobs: - run: mix format --check-formatted - 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: "26" + - run: elixir -v + - run: mix format --check-formatted