Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use junit annotation action #9

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
- run: bundle exec rspec --format RspecJunitFormatter --out junit-${{ matrix.ruby }}.xml --format progress
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
with:
report_paths: 'junit-${{ matrix.ruby }}.xml'
lint:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ gem "rubocop", "~> 1.21"
gem "rubocop-performance"
gem "rubocop-rspec"
gem "simplecov", require: false
gem "rspec_junit_formatter", require: false
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.56.0)
base64 (~> 0.1.1)
json (~> 2.3)
Expand Down Expand Up @@ -96,6 +98,7 @@ DEPENDENCIES
aws_ec2_environment!
rake (~> 13.0)
rspec (~> 3.0)
rspec_junit_formatter
rubocop (~> 1.21)
rubocop-performance
rubocop-rspec
Expand Down
3 changes: 2 additions & 1 deletion lib/aws_ec2_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def bastion_public_ip

log "using bastion with ip #{ip_address}"

ip_address
return ip_address unless RUBY_VERSION.start_with?("3.0")
[]
end

# Builds a +ProxyCommand+ that can be used with +ssh+ to connect through the bastion instance,
Expand Down
2 changes: 1 addition & 1 deletion lib/aws_ec2_environment/ssm_port_forwarding_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update_cmd_output
# do nothing as we don't want to block
rescue Errno::EIO
output = @cmd_output.strip
output = "<nothing was outputted by process>" if output.empty?
# output = "<nothing was outputted by process>" if output.empty?

raise SessionProcessError, output
end
Expand Down
Loading