Skip to content

Commit 0b62742

Browse files
Remove RubyGem test matrix from Github Actions (#6345)
* Remove rubygems test matrix from Github Actions * Remove all required tests check * Make the ubuntu image consistant accross our Github Workflows * Define action id instead of using title
1 parent dd8f309 commit 0b62742

3 files changed

Lines changed: 18 additions & 35 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
repo_root: "."
121121
zizmor:
122122
name: zizmor
123-
runs-on: ubuntu-latest
123+
runs-on: ubuntu-24.04
124124
permissions:
125125
security-events: write
126126
# required for workflows in private repositories

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions: read-all
2020
jobs:
2121
analysis:
2222
name: Scorecard analysis
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
2525
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
2626
permissions:

.github/workflows/test.yml

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,29 @@ permissions:
88
contents: read
99

1010
jobs:
11-
# This is umbrella job for all tests needed to pass to make it simpler
12-
# to maintain GitHub Actions status required checks since job names and
13-
# amount change over the time and it is easier to maintian having just
14-
# this umbrella check set as required.
15-
status_check:
16-
name: All required tests passing check
17-
needs: [rails]
18-
runs-on: ubuntu-24.04
19-
if: always()
20-
steps:
21-
- run: /bin/${{ (needs.rails.result == 'success' || needs.rails.result == 'skipped') }}
22-
2311
rails:
2412
strategy:
2513
fail-fast: false
2614
matrix:
27-
rubygems:
28-
- name: locked
29-
version: "4.0.8"
30-
- name: latest
31-
version: latest
32-
ruby_version: ["4.0.2"]
3315
tests:
34-
- name: general
16+
- id: general
17+
name: General
3518
command: test
36-
- name: system
19+
- id: system
20+
name: System
3721
command: test:system
38-
include:
39-
- rubygems: { name: latest, version: latest }
40-
ruby_version: "4.0.2"
41-
tests: { name: "avo without pro", command: "test test/*/avo" }
42-
name: Rails tests ${{ matrix.tests.name }} (RubyGems ${{ matrix.rubygems.name }}, Ruby ${{ matrix.ruby_version }})
43-
runs-on: ubuntu-22.04
22+
- id: avo-without-pro
23+
name: Avo (without Pro)
24+
command: "test test/*/avo"
25+
name: Rails tests ${{ matrix.tests.name }}
26+
runs-on: ubuntu-24.04
4427
env:
45-
RUBYGEMS_VERSION: ${{ matrix.rubygems.version }}
28+
RUBYGEMS_VERSION: "4.0.8"
4629
# Fail hard when Toxiproxy is not running to ensure all tests (even Toxiproxy optional ones) are passing
4730
REQUIRE_TOXIPROXY: true
4831
TOXIPROXY_LISTEN_HOST: "0.0.0.0"
4932
TOXIPROXY_UPSTREAM: "search:9200"
50-
REQUIRE_AVO_PRO: ${{ github.secret_source != 'None' && matrix.tests.name != 'avo without pro' }}
33+
REQUIRE_AVO_PRO: ${{ github.secret_source != 'None' && matrix.tests.id != 'avo-without-pro' }}
5134
AVO_LICENSE_KEY: ${{ secrets.AVO_LICENSE_KEY }}
5235
BUNDLE_PACKAGER__DEV: ${{ secrets.BUNDLE_PACKAGER__DEV }}
5336
steps:
@@ -58,9 +41,9 @@ jobs:
5841
- name: Setup rubygems.org
5942
uses: ./.github/actions/setup-rubygems.org
6043
with:
61-
ruby-version: ${{ matrix.ruby_version }}
62-
rubygems-version: ${{ matrix.rubygems.version }}
63-
install-avo-pro: ${{ matrix.tests.name != 'avo without pro' }}
44+
ruby-version: "4.0.2"
45+
rubygems-version: "4.0.8"
46+
install-avo-pro: ${{ matrix.tests.id != 'avo-without-pro' }}
6447

6548
- name: Tests ${{ matrix.tests.name }}
6649
id: test-all
@@ -70,12 +53,12 @@ jobs:
7053
if: ${{ failure() && steps.test-all.outcome == 'failure' }}
7154
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
7255
with:
73-
name: capybara-screenshots-${{ matrix.tests.name }}-${{ matrix.rubygems.name }}
56+
name: capybara-screenshots-${{ matrix.tests.name }}
7457
path: tmp/capybara
7558
if-no-files-found: ignore
7659

7760
- name: Upload coverage to Codecov
78-
if: matrix.rubygems.name == 'locked' && (success() || failure())
61+
if: matrix.tests.id != 'avo-without-pro' && (success() || failure())
7962
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
8063
env:
8164
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)