Skip to content

Commit

Permalink
Merge pull request #15 from djberg96/freebsd_github_workflow
Browse files Browse the repository at this point in the history
Add FreeBSD to workflow.
  • Loading branch information
djberg96 authored Aug 3, 2024
2 parents 9ae9e04 + 5f698cc commit 6f35635
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', 'truffleruby']
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', 'truffleruby']
platform: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- ruby-version: truffleruby
Expand All @@ -26,10 +26,26 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y ruby devel/ruby-gems
run: |
gem install bundler --no-document
bundle install --quiet
bundle exec rake
3 changes: 2 additions & 1 deletion spec/file_temp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
RSpec.describe File::Temp do
let(:windows) { File::ALT_SEPARATOR }
let(:osx) { RbConfig::CONFIG['host_os'] =~ /darwin/i }
let(:bsd) { RbConfig::CONFIG['host_os'] =~ /freebsd|dragonfly/i }

before do
@dir = File::Temp::TMPDIR
Expand Down Expand Up @@ -104,7 +105,7 @@
end

example 'an error is raised if a custom template is invalid' do
skip 'skipped on OSX' if osx
skip 'skipped on this platform' if osx || bsd
expect{ described_class.new(:delete => false, :template => 'xx') }.to raise_error(Errno::EINVAL)
end
end
Expand Down

0 comments on commit 6f35635

Please sign in to comment.