-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/bundler/rubocop-1.42.0
- Loading branch information
Showing
13 changed files
with
85 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
|
@@ -17,17 +21,16 @@ jobs: | |
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: 2.7.5 | ||
ruby-version: 3.3.0 | ||
|
||
- name: Run Rubocop | ||
run: bundle exec rubocop | ||
|
||
rspec: | ||
runs-on: ${{ matrix.os }} | ||
needs: [rubocop] | ||
strategy: | ||
matrix: | ||
ruby: ["2.7.5", "3.0.3", "3.1.0", "3.2.0", "3.3.0"] | ||
ruby: ["3.1", "3.2", "3.3"] | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- name: Check out repository | ||
|
@@ -41,9 +44,6 @@ jobs: | |
bundler-cache: true | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- name: Run RSpec | ||
run: bundle exec rspec --format RSpec::Github::Formatter --format progress --color --tty | ||
|
||
- name: Install gem locally | ||
run: bundle exec rake install:local | ||
|
||
|
@@ -58,7 +58,11 @@ jobs: | |
CI: true | ||
with: | ||
coverageLocations: ${{ github.workspace }}/coverage/coverage.xml:cobertura | ||
coverageCommand: bundle exec rspec | ||
coverageCommand: bundle exec rspec --format RSpec::Github::Formatter | ||
|
||
- name: Run RSpec | ||
if: runner.os == 'macos' | ||
run: bundle exec rspec --format RSpec::Github::Formatter | ||
|
||
devcontainer: | ||
runs-on: ubuntu-latest | ||
|
@@ -76,14 +80,8 @@ jobs: | |
- name: Set up DevContainer CLI | ||
run: npm install -g @devcontainers/cli | ||
|
||
- name: Build and start DevContainer | ||
run: | | ||
devcontainer build --workspace-folder . | ||
devcontainer up --workspace-folder . | ||
- name: Run tests inside DevContainer | ||
run: devcontainer exec --workspace-folder . bundle exec rspec | ||
|
||
- name: Build DevContainer | ||
run: devcontainer build --workspace-folder . | ||
dockerfile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -97,3 +95,44 @@ jobs: | |
|
||
- name: Run tests in Docker container | ||
run: docker run --rm -v $(pwd):/workspace git-fame bundle exec rspec | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
needs: [rspec, rubocop, devcontainer, dockerfile] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: 3.3.0 | ||
|
||
- name: Setup git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
- name: Install gem-release | ||
run: gem install gem-release | ||
|
||
- name: Install dependencies | ||
run: bundle install | ||
|
||
- name: Increment version | ||
run: gem bump --version patch --tag --skip-ci --release --file lib/git_fame/version.rb | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} | ||
|
||
- name: Install dependencies | ||
run: bundle install | ||
env: | ||
BUNDLE_FROZEN: "false" | ||
|
||
- name: Add and commit version bump | ||
run: git commit -a --amend --no-edit | ||
|
||
- name: Push changes | ||
run: git push --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,5 @@ group :test do | |
gem "simplecov" | ||
gem "simplecov-cobertura" | ||
end | ||
|
||
gem "racc", "~> 1.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module GitFame | ||
VERSION = "3.1.1" | ||
VERSION = "3.2.14" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters