From 75ef27f2920c1e25e0c88c2d92c27cf05dcba5fa Mon Sep 17 00:00:00 2001 From: Benjamin Moss Date: Sat, 12 Oct 2024 23:38:51 -0400 Subject: [PATCH 1/4] Add currently supported elixir versions to the test matrix * Includes the highest OTP version mentioned in https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp --- .github/workflows/test.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d98f475..df30fa12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,8 +8,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - otp: ['25.3', '26.2'] - elixir: ['1.16.0'] + include: + - elixir: 1.17.x + otp: 27 + - elixir: 1.16.x + otp: 26 + - elixir: 1.15.x + otp: 26 + - elixir: 1.14.x + otp: 26 + - elixir: 1.13.x + otp: 25 services: postgres: From d2308009802dfc0d4a8893ab0e4a84a46c6ac120 Mon Sep 17 00:00:00 2001 From: Benjamin Moss Date: Sat, 12 Oct 2024 23:50:33 -0400 Subject: [PATCH 2/4] CI compiles with warnings as errors --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df30fa12..767b2d90 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,9 @@ jobs: MIX_ENV=test mix event_store.setup MIX_ENV=jsonb mix event_store.setup + - name: Compile + run: mix compile --warnings-as-errors + - name: Run tests run: mix test.all From 56f63825cff576d6ef03ef2140ba6e642cdaf5fd Mon Sep 17 00:00:00 2001 From: Benjamin Moss Date: Sat, 12 Oct 2024 23:59:43 -0400 Subject: [PATCH 3/4] Only run formatting on newer releases --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 767b2d90..6a734159 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,8 +17,10 @@ jobs: otp: 26 - elixir: 1.14.x otp: 26 + check_formatted: "ignore" - elixir: 1.13.x otp: 25 + check_formatted: "ignore" services: postgres: @@ -54,6 +56,7 @@ jobs: run: mix deps.get - name: Check formatting + if: ${{ matrix.check_formatted != 'ignore' }} run: mix format --check-formatted - name: Setup EventStore test databases From c712659689983667cbc25d92531c9ce53c956cf4 Mon Sep 17 00:00:00 2001 From: Benjamin Moss Date: Sun, 13 Oct 2024 00:24:06 -0400 Subject: [PATCH 4/4] CI on PRs, pushes to master and tags --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a734159..927ddd0d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,11 @@ name: Test -on: [push, pull_request] +on: + pull_request: + push: + branches: + - master + - 'v*' jobs: build: