99 # Triggers the workflow on pull request events.
1010 pull_request :
1111 types : [opened, reopened, synchronize]
12-
12+ schedule :
13+ - cron : 12 13 * * 1 # Weekly
1314 # Allows you to run this workflow manually from the Actions tab
1415 workflow_dispatch :
1516
@@ -19,7 +20,58 @@ concurrency:
1920 cancel-in-progress : true
2021
2122jobs :
22- # Since the name of the matrix job depends on the version, we define another job with a more stable name.
23+ orchestrate :
24+ runs-on : ubuntu-latest
25+ name : Prepare Tests
26+ outputs :
27+ supported_crdbs : ${{ steps.crdb.outputs.crdbs }}
28+ latest_crdb : ${{ steps.crdb.outputs.latest }}
29+ steps :
30+ - id : crdb
31+ name : Determine Supported CockroachDB Versions
32+ shell : ruby -rcsv -rjson -rnet/http -ruri -e {0}
33+ run : |
34+ puts "hey"
35+
36+ test :
37+ runs-on : ubuntu-latest
38+ needs : orchestrate
39+ continue-on-error : ${{ matrix.experimental }}
40+ strategy :
41+ fail-fast : false
42+ matrix :
43+ # https://www.cockroachlabs.com/docs/releases/release-support-policy
44+ crdb : ${{ fromJSON(needs.orchestrate.outputs.supported_crdbs) }}
45+ ruby : ["3.4"]
46+ rails : ["8-1-stable"]
47+ experimental : [false]
48+ include :
49+ - crdb : ${{ fromJSON(needs.orchestrate.outputs.latest_crdb) }}
50+ ruby : " 3.4"
51+ rails : " main"
52+ experimental : true
53+ name : Test (crdb=${{ matrix.crdb }} ruby=${{ matrix.ruby }} rails=${{ matrix.rails }})
54+ steps :
55+ - name : Set Up Actions
56+ uses : actions/checkout@v4
57+ - uses : ./.github/actions/test-runner
58+ id : test
59+ with :
60+ crdb : ${{ matrix.crdb }}
61+ ruby : ${{ matrix.ruby }}
62+ env :
63+ RAILS_TAG : ${{ matrix.rails }}
64+ JSON_REPORTER : " report.json"
65+ - name : Upload Report
66+ if : ${{ failure() && steps.test.conclusion == 'failure' }}
67+ uses : actions/upload-artifact@v4
68+ with :
69+ name : report-${{ matrix.crdb }}-${{ matrix.ruby }}
70+ path : report.json
71+ # Since the name of the matrix job depends on the
72+ # version, we define another job with a more stable
73+ # name. We also aggregate failed tests to display
74+ # in the Github Summary.
2375 test_results :
2476 if : ${{ always() }}
2577 runs-on : ubuntu-latest
@@ -92,29 +144,3 @@ jobs:
92144 echo '```json' >>$GITHUB_STEP_SUMMARY
93145 jq --slurp --compact-output '.' reports/*/report.json >>$GITHUB_STEP_SUMMARY
94146 echo '```' >>$GITHUB_STEP_SUMMARY
95-
96- test :
97- runs-on : ubuntu-latest
98- strategy :
99- fail-fast : false
100- matrix :
101- # https://www.cockroachlabs.com/docs/releases/release-support-policy
102- crdb : [v24.3, v25.1, v25.2, v25.3]
103- ruby : ["3.4"]
104- name : Test (crdb=${{ matrix.crdb }} ruby=${{ matrix.ruby }})
105- steps :
106- - name : Set Up Actions
107- uses : actions/checkout@v4
108- - uses : ./.github/actions/test-runner
109- id : test
110- with :
111- crdb : ${{ matrix.crdb }}
112- ruby : ${{ matrix.ruby }}
113- env :
114- JSON_REPORTER : " report.json"
115- - name : Upload Report
116- if : ${{ failure() && steps.test.conclusion == 'failure' }}
117- uses : actions/upload-artifact@v4
118- with :
119- name : report-${{ matrix.crdb }}-${{ matrix.ruby }}
120- path : report.json
0 commit comments