summaryrefslogtreecommitdiff
path: root/.github/workflows/upstream-dispatch.yml
blob: 0c090c4e72222ec7f3136dd2587fc6c889dacfc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Upstream Dispatch
on: repository_dispatch
jobs:
  build:
    name: ${{ github.event.client_payload.message }}
    runs-on: ubuntu-latest
    env:
      ASCIIDOCTOR_DIAGRAM_VERSION: '~> 2.1'
      PYGMENTS_VERSION: '~> 2.0'
      RGHOST_VERSION: '0.9.7'
      PRAWN_GMAGICK_VERSION: '0.0.9'
    steps:
    - uses: actions/checkout@v2
    - name: Install Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: '3.0'
    - name: Configure Bundler
      run: |
        bundle config --local clean true
        bundle config --local path .bundle/gems
        bundle config --local without coverage docs lint
    - name: Install system dependencies
      run: |
        sudo apt-get update
        sudo apt-get install ghostscript libgraphicsmagick1-dev poppler-utils
    - name: Install dependencies
      run: |
        bundle --jobs 3 --retry 3
        # FIXME: should switch to branch specified in payload
        bundle exec ruby scripts/switch-to-asciidoctor-head.rb
        rm -f Gemfile.lock
        bundle --jobs 3 --retry 3
    - name: Run tests
      run: bundle exec ruby -w $(bundle exec ruby -e 'print File.join Gem.bindir, %q(rake)') spec