diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40ce024..a92724e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 \ No newline at end of file + - 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 \ No newline at end of file diff --git a/test/test_phashion.rb b/test/test_phashion.rb index 7df60cc..0be58ff 100644 --- a/test/test_phashion.rb +++ b/test/test_phashion.rb @@ -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')