79 lines
2 KiB
YAML
79 lines
2 KiB
YAML
name: Lint & Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, staging, trying ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
CI: true
|
|
DEBIAN: noninteractive
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- uses: leafo/gh-actions-lua@v8.0.0
|
|
- uses: leafo/gh-actions-luarocks@v4.0.0
|
|
|
|
- name: Install LuaCheck
|
|
run: luarocks install luacheck
|
|
|
|
- name: Run checks
|
|
run: make check LUA_VERSION=${{ matrix.lua_version }}
|
|
|
|
test:
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- lua_version: '5.1'
|
|
- lua_version: '5.2'
|
|
- lua_version: '5.3'
|
|
- lua_version: 'luajit'
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- uses: leafo/gh-actions-lua@v8.0.0
|
|
with:
|
|
luaVersion: ${{ matrix.lua_version }}
|
|
- uses: leafo/gh-actions-luarocks@v4.0.0
|
|
|
|
- name: Install dependencies
|
|
shell: /bin/bash -o errexit -o pipefail -o xtrace {0}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev libpulse-dev
|
|
luarocks install busted
|
|
luarocks install lgi
|
|
|
|
- name: Run tests
|
|
run: make test LUA_VERSION=${{ matrix.lua_version }}
|
|
|
|
rock:
|
|
runs-on: ubuntu-20.04
|
|
needs: [test, check]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- lua_version: '5.1'
|
|
- lua_version: '5.2'
|
|
- lua_version: '5.3'
|
|
steps:
|
|
- uses: actions/checkout@v2.4.0
|
|
- uses: leafo/gh-actions-lua@v8.0.0
|
|
with:
|
|
luaVersion: ${{ matrix.lua_version }}
|
|
- uses: leafo/gh-actions-luarocks@v4.0.0
|
|
|
|
- name: Install dependencies
|
|
shell: /bin/bash -o errexit -o pipefail -o xtrace {0}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends gobject-introspection libgirepository1.0-dev
|
|
|
|
- name: Make rock
|
|
run: make rock LUA_VERSION=${{ matrix.lua_version }}
|