|
| 1 | +name: downstream |
| 2 | +concurrency: |
| 3 | + group: "${{github.workflow}}-${{github.ref}}" |
| 4 | + cancel-in-progress: true |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + schedule: |
| 8 | + - cron: "0 8 * * 1,3,5" # At 08:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_8_*_*_1,3,5 |
| 9 | + push: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + - v*.*.x |
| 13 | + tags: |
| 14 | + - v*.*.* |
| 15 | + pull_request: |
| 16 | + types: [opened, synchronize] |
| 17 | + branches: |
| 18 | + - '*' |
| 19 | + |
| 20 | +jobs: |
| 21 | + downstream: |
| 22 | + name: downstream-${{matrix.name}} |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + include: |
| 27 | + - url: https://github.com/flavorjones/loofah |
| 28 | + name: loofah |
| 29 | + command: "bundle exec rake test" |
| 30 | + - url: https://github.com/rails/rails-html-sanitizer |
| 31 | + name: rails-html-sanitizer |
| 32 | + command: "bundle exec rake test" |
| 33 | + - url: https://github.com/rgrove/sanitize |
| 34 | + name: sanitize |
| 35 | + command: "bundle exec rake test" |
| 36 | + - url: https://github.com/ebeigarts/signer |
| 37 | + name: signer |
| 38 | + command: "bundle exec rake spec" |
| 39 | + - url: https://github.com/WinRb/Viewpoint |
| 40 | + name: viewpoint |
| 41 | + command: "bundle exec rspec spec" |
| 42 | + - url: https://github.com/rails/rails |
| 43 | + name: xmlmini |
| 44 | + command: "cd activesupport && bundle exec rake test TESTOPTS=-n/XmlMini/" |
| 45 | + runs-on: ubuntu-latest |
| 46 | + container: |
| 47 | + image: ghcr.io/sparklemotion/nokogiri-test:mri-3.1 |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v2 |
| 50 | + with: |
| 51 | + submodules: true |
| 52 | + - uses: actions/cache@v2 |
| 53 | + with: |
| 54 | + path: ports |
| 55 | + key: ports-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}} |
| 56 | + - run: bundle install --local || bundle install |
| 57 | + - run: bundle exec rake compile |
| 58 | + - run: | |
| 59 | + git clone --depth=1 ${{matrix.url}} ${{matrix.name}} |
| 60 | + cd ${{matrix.name}} |
| 61 | + if grep nokogiri Gemfile ; then |
| 62 | + sed -i 's/\(.*nokogiri.*\)/\1, path: ".."/' Gemfile |
| 63 | + else |
| 64 | + echo "gem 'nokogiri', path: '..'" >> Gemfile |
| 65 | + fi |
| 66 | + bundle install --local || bundle install |
| 67 | + ${{matrix.command}} |
0 commit comments