name: Test External

on: [push, pull_request]

permissions:
  contents: read

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        ruby: ['3.2', '3.3', '3.4']

    runs-on: ${{matrix.os}}
    env:
      CI: external

    steps:
    - uses: actions/checkout@v4

    - uses: ruby/setup-ruby-pkgs@v1
      with:
        ruby-version: ${{matrix.ruby}}
        bundler-cache: true
        apt-get: pandoc
        brew: pandoc

    - name: Change permissions
      run: chmod -R o-w /opt/hostedtoolcache/Ruby

    - run: bundle exec bake test:external
