From 2aa8258551b497a1e5c2a5c9604a36fa6faf155f Mon Sep 17 00:00:00 2001 From: Florian Arens <60519307+Flo0807@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:34:06 +0100 Subject: [PATCH 1/4] Add daily CI pipeline for Elixir main branch Run lint and test jobs against the latest Elixir main branch once a day to catch compatibility issues early. --- .github/workflows/elixir-main.yml | 90 +++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/elixir-main.yml diff --git a/.github/workflows/elixir-main.yml b/.github/workflows/elixir-main.yml new file mode 100644 index 000000000..9cec60e45 --- /dev/null +++ b/.github/workflows/elixir-main.yml @@ -0,0 +1,90 @@ +name: Elixir Main + +on: + workflow_dispatch: + schedule: + - cron: "0 6 * * *" # Every day at 06:00 UTC + +jobs: + test: + name: "Test backpex (Elixir main)" + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - uses: erlef/setup-beam@9d5b75ddfda22fb979d2270283237aef8aa68d6b # v1.22.0 + with: + otp-version: "28" + elixir-version: "main" + + - name: Setup node + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: 24 + cache: "yarn" + cache-dependency-path: yarn.lock + + - name: Restore the deps and _build cache + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + id: restore-cache + env: + MIX_LOCK_HASH: ${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} + with: + path: | + deps + _build + key: ${{ runner.os }}-elixir-main-otp-28-build-deps-mixlockhash-${{ env.MIX_LOCK_HASH }} + restore-keys: ${{ runner.os }}-elixir-main-otp-28-build-deps- + + - name: Install dependencies + if: steps.restore-cache.outputs.cache-hit != 'true' + run: mix deps.get + + - name: Compile dependencies + if: steps.restore-cache.outputs.cache-hit != 'true' + run: mix deps.compile + + - name: Compile with warnings as errors + run: mix compile --warnings-as-errors --force + + - name: Cache node modules + uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 + id: yarn-cache + with: + path: node_modules + key: ${{ runner.os }}-node-24-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-24-yarn- + + - name: Install node dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --pure-lockfile + + - name: Check formatting + run: mix format --check-formatted + + - name: JavaScript Standard + run: yarn run lint:standard + + - name: Credo + run: mix credo + + - name: Sobelow + run: mix sobelow --config + + - name: Deps Unused + run: mix deps.unlock --check-unused + + - name: Run tests + run: mix test + + - name: Run doc tests + run: mix test test/doc_test.exs + + - name: Gettext Check + run: mix gettext.extract --check-up-to-date + + - name: Check assets up-to-date + run: mix assets.check From 7963dd89de4c0336a7c0e042d5cc75a2b157b557 Mon Sep 17 00:00:00 2001 From: Florian Arens <60519307+Flo0807@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:37:29 +0100 Subject: [PATCH 2/4] Change Elixir main CI schedule from daily to weekly --- .github/workflows/elixir-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/elixir-main.yml b/.github/workflows/elixir-main.yml index 9cec60e45..509ce8e7c 100644 --- a/.github/workflows/elixir-main.yml +++ b/.github/workflows/elixir-main.yml @@ -3,7 +3,7 @@ name: Elixir Main on: workflow_dispatch: schedule: - - cron: "0 6 * * *" # Every day at 06:00 UTC + - cron: "0 6 * * 1" # Every Monday at 06:00 UTC jobs: test: From bd5986c5b68d6f37011d8fec22b2dec315faa2af Mon Sep 17 00:00:00 2001 From: Florian Arens <60519307+Flo0807@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:53:06 +0100 Subject: [PATCH 3/4] Use resolved Elixir and OTP versions in cache keys Avoid stale cache hits when Elixir main or OTP 28.x changes between runs. --- .github/workflows/elixir-main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/elixir-main.yml b/.github/workflows/elixir-main.yml index 509ce8e7c..ebba2710f 100644 --- a/.github/workflows/elixir-main.yml +++ b/.github/workflows/elixir-main.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: erlef/setup-beam@9d5b75ddfda22fb979d2270283237aef8aa68d6b # v1.22.0 + id: beam with: otp-version: "28" elixir-version: "main" @@ -30,13 +31,15 @@ jobs: uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 id: restore-cache env: + OTP_VERSION: ${{ steps.beam.outputs.otp-version }} + ELIXIR_VERSION: ${{ steps.beam.outputs.elixir-version }} MIX_LOCK_HASH: ${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} with: path: | deps _build - key: ${{ runner.os }}-elixir-main-otp-28-build-deps-mixlockhash-${{ env.MIX_LOCK_HASH }} - restore-keys: ${{ runner.os }}-elixir-main-otp-28-build-deps- + key: ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-build-deps-mixlockhash-${{ env.MIX_LOCK_HASH }} + restore-keys: ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-build-deps- - name: Install dependencies if: steps.restore-cache.outputs.cache-hit != 'true' From 7b9e0c28d876cb40f1ee61ad338def811496f9d1 Mon Sep 17 00:00:00 2001 From: Florian Arens <60519307+Flo0807@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:54:17 +0100 Subject: [PATCH 4/4] Always run deps.get and deps.compile Elixir main changes frequently, so always refresh dependencies to avoid stale build artifacts. --- .github/workflows/elixir-main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/elixir-main.yml b/.github/workflows/elixir-main.yml index ebba2710f..95f89edbf 100644 --- a/.github/workflows/elixir-main.yml +++ b/.github/workflows/elixir-main.yml @@ -42,11 +42,9 @@ jobs: restore-keys: ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}-otp-${{ env.OTP_VERSION }}-build-deps- - name: Install dependencies - if: steps.restore-cache.outputs.cache-hit != 'true' run: mix deps.get - name: Compile dependencies - if: steps.restore-cache.outputs.cache-hit != 'true' run: mix deps.compile - name: Compile with warnings as errors