Skip to content

Commit

Permalink
Run tests on ubuntu22
Browse files Browse the repository at this point in the history
  • Loading branch information
sofakingworld committed Apr 27, 2023
1 parent 8c01e73 commit e30960d
Showing 1 changed file with 43 additions and 22 deletions.
65 changes: 43 additions & 22 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,53 @@ on:
types: [opened, synchronize, closed]


permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-18.04
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / CH ${{matrix.clickhouse}} / HTTP Adapter ${{matrix.adapter}}
tests:
runs-on: ubuntu-20.04
name: Tests on ${{matrix.environment.elixir-version}} / CH ${{matrix.clickhouse}} / HTTP Adapter ${{matrix.adapter}}
strategy:
matrix:
adapter: [HttpcAdapter, TeslaMintAdapter]
clickhouse: [22.5, 22.9.2, 23.1]
environment:
- elixir-version: 1.14
otp-version: 25.0.4
- elixir-version: 1.13
otp-version: 24.3.4
services:
clickhouse:
image: clickhouse/clickhouse-server:${{matrix.clickhouse}}
ports:
- 8123:8123
strategy:
matrix:
adapter: [HttpcAdapter, TeslaMintAdapter]
otp: [23.1.2]
elixir: [1.13.4, 1.14.1]
clickhouse: [22.5, 22.9.2, 23.1]
env:
PILLAR_HTTP_ADAPTER: ${{matrix.adapter}}
MIX_ENV: test
CLICKHOUSE_URL: "http://localhost:8123"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix deps.get
- run: mix format --check-formatted
- run: mix test
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f
with: ${{matrix.environment}}
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps/
key: deps-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }}
- name: Restore build cache
uses: actions/cache@v3
with:
path: _build/test/
key: build-${{ runner.os }}-${{ matrix.environment.otp-version }}-${{ matrix.environment.elixir-version }}-${{ hashFiles('**/mix.lock') }}
- name: Install dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix compile
mix format --check-formatted
- name: Run tests
run: mix test
env:
PILLAR_HTTP_ADAPTER: ${{matrix.adapter}}
MIX_ENV: test
CLICKHOUSE_URL: "http://localhost:8123"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e30960d

Please sign in to comment.