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

chore: CI, create MacOSx ci runner #95

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
31 changes: 23 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ on:
branches: [ '*' ]

jobs:
test:
runs-on: ubuntu-latest
ci_ubuntu:
runs-on: ubuntu-22.04 # currently ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: [3.2, 3.1, 3.0, 2.7, 2.6, 2.5]
steps:
Expand All @@ -18,9 +19,23 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
- name: Install xmllint
run: sudo apt-get install -y libpng-dev libjpeg-dev
- name: Install dependencies
run: bundle install
- name: Compile
run: bundle exec rake compile
- name: Run tests
run: bundle exec rake
- run: bundle install
- run: bundle exec rake compile
- run: bundle exec rake

ci_mac:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ruby-version: [3.2, 3.1, 3.0, 2.7]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- run: brew install libjpeg libpng sqlite3
- run: bundle install
- run: bundle exec rake compile
- run: bundle exec rake
2 changes: 1 addition & 1 deletion test/test_phashion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_duplicate_with_custom_distance_threshold
assert(jpg.duplicate?(jpg_x, threshold: 2))
end

def test_duplicate_meta_methods
def test_duplicate_meta_methods
# note: this test depends on the smaller_jpg test still asserting a distance of 2
# note-2: threshold is a :less-than-or-equal-to comparison, which is a change from version 1.0.8
jpg = Phashion::Image.new(File.dirname(__FILE__) + '/jpg/Broccoli_Super_Food.jpg')
Expand Down