Skip to content

Commit 329cc36

Browse files
authored
Merge pull request #64 from bastelfreak/ci2
CI: Add proper CI dummy job we can depend on & Run on all pushes + merges & merge workflows into fewer files
2 parents 566fa74 + d8e84c6 commit 329cc36

2 files changed

Lines changed: 61 additions & 65 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
name: Checks
33

44
on:
5+
pull_request: {}
56
push:
67
branches:
78
- main
8-
pull_request:
9-
branches:
10-
- main
119

1210
# minimal permissions
1311
permissions:
@@ -28,3 +26,63 @@ jobs:
2826
bundler-cache: true
2927
- run: bundle exec rake rubocop
3028
- run: gem build --strict --verbose *.gemspec
29+
30+
linux_unit_tests:
31+
needs:
32+
- rubocop_checks
33+
name: Ruby version
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
ruby:
38+
- '2.7'
39+
- '3.0'
40+
- '3.2'
41+
- '3.3'
42+
- '3.4'
43+
- '4.0'
44+
- 'jruby-9.4.8.0'
45+
runs-on: ubuntu-24.04
46+
steps:
47+
- name: Checkout current PR
48+
uses: actions/checkout@v4
49+
50+
- name: Rspec checks
51+
uses: ruby/setup-ruby@v1
52+
with:
53+
ruby-version: ${{ matrix.ruby }}
54+
bundler-cache: true
55+
- run: bundle exec rake spec_random
56+
57+
windows_unit_tests:
58+
name: Windows tests with Ruby ${{ matrix.ruby }}
59+
strategy:
60+
matrix:
61+
ruby:
62+
- '2.7'
63+
- '3.2'
64+
runs-on: windows-2025
65+
steps:
66+
- name: Checkout current PR
67+
uses: actions/checkout@v4
68+
69+
- name: Rspec checks
70+
uses: ruby/setup-ruby@v1
71+
with:
72+
ruby-version: ${{ matrix.ruby }}
73+
bundler-cache: true
74+
- run: bundle exec rake spec_random
75+
76+
tests:
77+
if: always()
78+
needs:
79+
- rubocop_checks
80+
- linux_unit_tests
81+
- windows_unit_tests
82+
runs-on: ubuntu-24.04
83+
name: Test suite
84+
steps:
85+
- name: Decide whether the needed jobs succeeded or failed
86+
uses: re-actors/alls-green@release/v1
87+
with:
88+
jobs: ${{ toJSON(needs) }}

.github/workflows/unit_tests.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)