CI: Switch to GitHub Actions #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| lua: | |
| - "5.1" | |
| - "5.2" | |
| - "5.3" | |
| - "5.4" | |
| - "luajit-2.1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Cache Dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| .lua/ | |
| .luarocks/ | |
| key: ${{ runner.os }}-${{ matrix.lua }}-${{ hashFiles('.github/workflows/build.yml') }} | |
| - name: Setup Lua | |
| uses: leafo/gh-actions-lua@v12 | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| with: | |
| luaVersion: ${{ matrix.lua }} | |
| - name: Setup LuaRocks | |
| uses: leafo/gh-actions-luarocks@v6 | |
| - name: Dependencies | |
| run: |- | |
| luarocks install --only-deps $(find luarocks -name '*-scm-*.rockspec' | sort -g | tail -1) | |
| luarocks install dromozoa-utf8 | |
| luarocks install cluacov | |
| luarocks install busted | |
| luarocks install luacov-coveralls | |
| - name: Test | |
| run: |- | |
| timeout 120 busted -c | |
| - name: Coverage Report | |
| run: | | |
| luacov-coveralls --dryrun -e '.luarocks/' -e spec/ -e luarocks/ -i wcwidth/ -i wcwidth.lua -o coveralls.json -v | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel: true | |
| file: coveralls.json | |
| finish: | |
| runs-on: ubuntu-24.04 | |
| needs: [build] | |
| if: ${{ always() }} | |
| steps: | |
| - uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true |