Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test

on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y ffmpeg
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install taglib
echo "PKG_CONFIG_PATH=$(brew --prefix taglib)/lib/pkgconfig" >> $GITHUB_ENV
echo "LIBRARY_PATH=$(brew --prefix taglib)/lib" >> $GITHUB_ENV
echo "CPATH=$(brew --prefix taglib)/include" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(brew --prefix taglib)/lib" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
- run: bundle exec rake test
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AllCops:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 3.1
TargetRubyVersion: 3.3

Style/Documentation:
Enabled: false
Expand Down
3 changes: 2 additions & 1 deletion test/wavesync/file_converter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def teardown
FileUtils.touch(source_aiff)
FileUtils.touch(File.join(@target_dir, 'track.mp3'))

audio = stub(bpm: nil)
Audio.any_instance.stubs(:duration).returns(0)
audio = stub(bpm: nil, duration: 0)
source_format = AudioFormat.new(file_type: 'aiff', sample_rate: 44_100, bit_depth: 16)
target_format = AudioFormat.new(file_type: 'mp3', sample_rate: nil, bit_depth: nil)
result = @converter.convert(audio, source_aiff, @path_resolver, source_format, target_format)
Expand Down
2 changes: 1 addition & 1 deletion wavesync.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.metadata['rubygems_mfa_required'] = 'true'
spec.license = 'MIT'

spec.required_ruby_version = '>= 3.1'
spec.required_ruby_version = '>= 3.3'

spec.files = Dir['lib/**/*.rb', 'bin/*', 'config/**/*', 'LICENSE', 'README.md']
spec.bindir = 'bin'
Expand Down
Loading