Skip to content

Commit 4df0272

Browse files
committed
Improve GitHub Actions workflow structure
1 parent 89ec703 commit 4df0272

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

.github/workflows/main.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
name: git-fame
2+
23
on: [push]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
39
jobs:
410
rubocop:
511
runs-on: ubuntu-latest
612
steps:
7-
- uses: actions/checkout@v4
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install cmake
17+
uses: jwlawson/actions-setup-cmake@v2
818

9-
- uses: jwlawson/actions-setup-cmake@v2
10-
- uses: ruby/setup-ruby@v1
19+
- name: Install ruby
20+
uses: ruby/setup-ruby@v1
1121
with:
1222
bundler-cache: true
1323
ruby-version: 2.7.5
14-
- run: bundle exec rubocop
24+
25+
- name: Rubocop
26+
run: bundle exec rubocop
1527

1628
rspec:
1729
runs-on: ${{ matrix.os }}
@@ -21,21 +33,31 @@ jobs:
2133
ruby: ["2.7.5", "3.0.3", "3.1.0", "3.2.0", "3.3.0"]
2234
os: [ubuntu-latest, macos-latest]
2335
steps:
24-
- uses: actions/checkout@v4
36+
- name: Check out repository
37+
uses: actions/checkout@v4
2538
with:
2639
fetch-depth: "0"
27-
- uses: jwlawson/actions-setup-cmake@v2
2840

29-
- uses: ruby/setup-ruby@v1
41+
- name: Install cmake
42+
uses: jwlawson/actions-setup-cmake@v2
43+
44+
- name: Install ruby
45+
uses: ruby/setup-ruby@v1
3046
with:
3147
bundler-cache: true
3248
ruby-version: ${{ matrix.ruby }}
3349

34-
- run: bundle exec rspec --format RSpec::Github::Formatter --format progress --color --tty
35-
- run: bundle exec rake install:local
36-
- run: bundle exec exe/git-fame --log-level debug
50+
- name: Run tests
51+
run: bundle exec rspec --format RSpec::Github::Formatter --format progress --color --tty
52+
53+
- name: Install gem locally
54+
run: bundle exec rake install:local
55+
56+
- name: Run git-fame
57+
run: bundle exec exe/git-fame --log-level debug
3758

38-
- uses: paambaati/codeclimate-action@v9
59+
- name: Codeclimate (code coverage)
60+
uses: paambaati/codeclimate-action@v9
3961
env:
4062
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
4163
CI: true

0 commit comments

Comments
 (0)