Merge pull request #418 from DavidS/claude/review-next-tasks-AvwXF #106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: [push] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| base-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Quoted to keep YAML from coercing trailing-zero versions like '3.0' / '4.0' | |
| # to floats (https://github.com/actions/runner/issues/849). | |
| ruby: ["3.2", "3.3", "3.4", "4.0"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install libvips for ruby-vips | |
| run: sudo apt-get update && sudo apt-get install -y libvips42 libvips-dev libvips-tools | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - run: bundle exec rake | |
| test-site: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Quoted to keep YAML from coercing trailing-zero versions like '3.0' / '4.0' | |
| # to floats (https://github.com/actions/runner/issues/849). | |
| ruby: ["3.2", "3.3", "3.4", "4.0"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install libvips for ruby-vips | |
| run: sudo apt-get update && sudo apt-get install -y libvips42 libvips-dev libvips-tools | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| working-directory: spec/fixtures/test_site | |
| - id: build-test-site | |
| working-directory: spec/fixtures/test_site | |
| run: | | |
| bundle exec jekyll build --strict --trace --verbose | |
| find _site -type f | |
| echo -e '\n===\n' | |
| cat _site/gallery_one/index.html | |
| file _site/gallery_two/third/Morgenspaziergang-3.jpg_thumb.jpg | |
| - name: Verify rendered output (dimensions + EXIF strip) | |
| working-directory: spec/fixtures/test_site | |
| run: | | |
| set -euo pipefail | |
| # gallery_two: max_size 600x400; source 1000x750 → 533x400 | |
| vipsheader _site/gallery_two/Frostig-001.jpg | |
| test "$(vipsheader -f width _site/gallery_two/Frostig-001.jpg)" = 533 | |
| test "$(vipsheader -f height _site/gallery_two/Frostig-001.jpg)" = 400 | |
| # 150x150 centre-cropped per-image thumb | |
| test "$(vipsheader -f width _site/gallery_two/Frostig-001.jpg_thumb.jpg)" = 150 | |
| test "$(vipsheader -f height _site/gallery_two/Frostig-001.jpg_thumb.jpg)" = 150 | |
| # EXIF must be stripped from every rendered output | |
| ! vipsheader -a _site/gallery_two/Frostig-001.jpg | grep -i '^exif-' | |
| ! vipsheader -a _site/gallery_two/Frostig-001.jpg_thumb.jpg | grep -i '^exif-' | |
| ! vipsheader -a _site/gallery_one/2012-07-29-Eingeschlafen.jpg | grep -i '^exif-' |