name: Lua tests # Runs the offline test suite (Amibis/Tests/run.lua) on every push. # workflow_dispatch also allows a manual run from the Actions tab. on: push: workflow_dispatch: jobs: test: runs-on: ubuntu-latest timeout-minutes: 10 steps: # The server currently corrupts git clone/fetch pack responses # ("fatal: protocol error: bad pack header"), which breaks # actions/checkout, so fetch the commit archive from the API instead. - name: Fetch source archive env: TOKEN: ${{ secrets.GITEA_TOKEN }} URL: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/archive/${{ gitea.sha }}.tar.gz run: | if ! curl -fsSL -H "Authorization: token $TOKEN" -o "$RUNNER_TEMP/source.tar.gz" "$URL"; then curl -fsSL -o "$RUNNER_TEMP/source.tar.gz" "$URL" fi tar -xzf "$RUNNER_TEMP/source.tar.gz" -C "$GITHUB_WORKSPACE" --strip-components=1 - name: Install Lua 5.4 run: | sudo apt-get update sudo apt-get install -y lua5.4 - name: Run offline test suite run: lua5.4 Amibis/Tests/run.lua