Skip to content

Commit 70e5aec

Browse files
committed
Run all tests in a single workflow with CodeCov
1 parent ffd993a commit 70e5aec

File tree

9 files changed

+92
-44
lines changed

9 files changed

+92
-44
lines changed

.github/workflows/codecov.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ on:
2121
jobs:
2222
codecov:
2323
runs-on: ubuntu-latest
24-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
24+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
2525
steps:
2626
- name: Codecov
27-
uses: codecov/[email protected]
28-
29-
- name: Trigger Codecov
30-
run: codecovcli send-notifications
27+
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
28+
run_command: send-notifications

.github/workflows/sentry_delayed_job_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: sentry-delayed_job Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
13-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: sentry-delayed-job-test-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
1612
ruby-versions:

.github/workflows/sentry_opentelemetry_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: sentry-opentelemetry Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
13-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: sentry-opentelemetry-test-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
1612
ruby-versions:

.github/workflows/sentry_rails_test.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ name: sentry-rails Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
13-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: sentry-rails-test-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
12+
ruby-versions:
13+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
14+
with:
15+
engine: cruby-jruby
16+
min_version: 2.7
1617
test:
18+
needs: ruby-versions
1719
defaults:
1820
run:
1921
working-directory: sentry-rails
@@ -27,8 +29,8 @@ jobs:
2729
strategy:
2830
fail-fast: false
2931
matrix:
32+
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
3033
rails_version: [6.1.0, 7.0.0, 7.1.0]
31-
ruby_version: [2.7, "3.0", "3.1", "3.2", "3.3"]
3234
include:
3335
- ruby_version: "2.4"
3436
rails_version: 5.0.0
@@ -88,6 +90,14 @@ jobs:
8890
rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal"
8991
- ruby_version: "3.2"
9092
rails_version: 7.1.0
93+
exclude:
94+
- ruby_version: head
95+
- ruby_version: jruby-head
96+
- ruby_version: "3.4"
97+
rails_version: "6.1.0"
98+
- ruby_version: "3.4"
99+
rails_version: "7.0.0"
100+
91101
steps:
92102
- uses: actions/checkout@v4
93103
- name: Install sqlite and ImageMagick

.github/workflows/sentry_raven_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
# Cancel in progress workflows on pull_requests.
1313
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
1414
concurrency:
15-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
group: sentry-raven-test-${{ github.head_ref || github.run_id }}
1616
cancel-in-progress: true
1717
jobs:
1818
test:
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
matrix:
2626
rails_version: [0, 4.2, 5.2, 6.0.0]
27-
ruby_version: [2.3, 2.4, 2.5, 2.6, 2.7, "3.0", jruby-9.3]
27+
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
2828
include:
2929
- ruby_version: "3.0"
3030
rails_version: 0

.github/workflows/sentry_resque_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: sentry-resque Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
13-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: sentry-resque-test-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
1612
ruby-versions:

.github/workflows/sentry_ruby_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: sentry-ruby Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
13-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: sentry-ruby-test-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
1612
ruby-versions:

.github/workflows/sentry_sidekiq_test.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ name: sentry-sidekiq Test
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- master
8-
- \d+-\d+
9-
pull_request:
5+
workflow_call:
106
# Cancel in progress workflows on pull_requests.
117
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
128
concurrency:
139
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1410
cancel-in-progress: true
1511
jobs:
12+
ruby-versions:
13+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
14+
with:
15+
engine: cruby-jruby
16+
min_version: 2.7
1617
test:
18+
needs: ruby-versions
1719
defaults:
1820
run:
1921
working-directory: sentry-sidekiq
@@ -28,7 +30,7 @@ jobs:
2830
fail-fast: false
2931
matrix:
3032
sidekiq_version: ["5.0", "6.5", "7.0"]
31-
ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", jruby]
33+
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
3234
include:
3335
- ruby_version: 2.4
3436
sidekiq_version: 5.0
@@ -56,6 +58,9 @@ jobs:
5658
sidekiq_version: 8.0.0.beta1
5759
- ruby_version: "3.4"
5860
sidekiq_version: 8.0.0.beta1
61+
exclude:
62+
- ruby_version: head
63+
- ruby_version: jruby-head
5964
steps:
6065
- uses: actions/checkout@v4
6166

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Tests & CodeCov
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- \d+-\d+
9+
pull_request:
10+
11+
# Add workflow-level concurrency
12+
concurrency:
13+
group: tests-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
delayed_job-tests:
18+
uses: ./.github/workflows/sentry_delayed_job_test.yml
19+
20+
opentelemetry-tests:
21+
uses: ./.github/workflows/sentry_opentelemetry_test.yml
22+
23+
rails-tests:
24+
uses: ./.github/workflows/sentry_rails_test.yml
25+
26+
resque-tests:
27+
uses: ./.github/workflows/sentry_resque_test.yml
28+
29+
ruby-tests:
30+
uses: ./.github/workflows/sentry_ruby_test.yml
31+
32+
sidekiq-tests:
33+
uses: ./.github/workflows/sentry_sidekiq_test.yml
34+
35+
codecov:
36+
name: CodeCov
37+
runs-on: ubuntu-latest
38+
needs:
39+
- ruby-tests
40+
- rails-tests
41+
- sidekiq-tests
42+
- delayed_job-tests
43+
- resque-tests
44+
- opentelemetry-tests
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Codecov
49+
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3
50+
with:
51+
run_command: send-notifications

0 commit comments

Comments
 (0)