name: Test

on: [ push, pull_request ]

jobs:

  test:
    strategy:
      fail-fast: false
      matrix:
        luaVersion: ['luajit', '5.1', '5.2', '5.3', '5.4.4']
    runs-on: ubuntu-22.04
    name: test lua ${{ matrix.luaVersion }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Setup ‘lua’
        uses: leafo/gh-actions-lua@v9
        with:
          luaVersion: ${{ matrix.luaVersion }}
          buildCache: true
      - name: Test
        run: |
          lua qrtest.lua
