Skip to content

CI: Switch to GitHub Actions #5

CI: Switch to GitHub Actions

CI: Switch to GitHub Actions #5

Workflow file for this run

name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
lua:
- "lua 5.1"
- "lua 5.2"
- "lua 5.3"
- "lua 5.4"
- "luajit 2.0"
- "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: Dependencies
run: |-
sudo apt install -y libreadline-dev
pip install hererocks
hererocks env --${{ matrix.lua }} -rlatest
source env/bin/activate
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: |-
source env/bin/activate
timeout 120 busted -c
- name: Coverage Report
run: |
source env/bin/activate
luacov-coveralls --dryrun -e 'env/' -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