mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-22 02:53:06 +00:00
switch to Github Actions
This commit is contained in:
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
TestMatrix:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
lua-version: ["5.4", "5.3", "5.2", "5.1", "luajit"]
|
||||||
|
os: ["ubuntu-latest"]
|
||||||
|
libflag: ["-shared --coverage"]
|
||||||
|
include:
|
||||||
|
- os: "macos-latest"
|
||||||
|
lua-version: "5.4"
|
||||||
|
libflag: "-bundle -undefined dynamic_lookup -all_load --coverage"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- uses: leafo/gh-actions-lua@v8.0.0
|
||||||
|
with:
|
||||||
|
luaVersion: ${{ matrix.lua-version }}
|
||||||
|
|
||||||
|
- uses: leafo/gh-actions-luarocks@master
|
||||||
|
|
||||||
|
- name: Prep
|
||||||
|
run: |
|
||||||
|
pip install --user cpp-coveralls
|
||||||
|
luarocks install lua-path
|
||||||
|
luarocks install dkjson
|
||||||
|
luarocks install luacov
|
||||||
|
# install luacov-coveralls, but avoid installing luafilesystem
|
||||||
|
luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}"
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
lua -lluacov tests/test.lua
|
||||||
|
|
||||||
|
- name: Coverage
|
||||||
|
run: |
|
||||||
|
export PATH="/Users/runner/Library/Python/2.7/bin:$PATH"
|
||||||
|
coveralls -b . -i src --dump c.report.json
|
||||||
|
luacov-coveralls -j c.report.json -v -t ${{ secrets.GITHUB_TOKEN }}
|
||||||
34
.travis.yml
34
.travis.yml
@@ -1,34 +0,0 @@
|
|||||||
language: c
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
env:
|
|
||||||
- LUA="lua 5.1"
|
|
||||||
- LUA="lua 5.2"
|
|
||||||
- LUA="lua 5.3"
|
|
||||||
- LUA="luajit 2.1"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- pip install --user cpp-coveralls hererocks
|
|
||||||
- hererocks env --$LUA --luarocks latest
|
|
||||||
- export PATH="$PWD/env/bin:$PATH"
|
|
||||||
- luarocks install lua-path
|
|
||||||
- luarocks install dkjson
|
|
||||||
- luarocks install luacov
|
|
||||||
# install luacov-coveralls, but avoid installing luafilesystem
|
|
||||||
- luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none
|
|
||||||
|
|
||||||
install:
|
|
||||||
- luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"
|
|
||||||
|
|
||||||
script:
|
|
||||||
- lua -lluacov tests/test.lua
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- coveralls -b . -i src --dump c.report.json
|
|
||||||
- luacov-coveralls -j c.report.json -v
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://travis-ci.org/keplerproject/luafilesystem)
|
[](https://github.com/keplerproject/luafilesystem/actions)
|
||||||
[](https://ci.appveyor.com/project/ignacio/luafilesystem)
|
[](https://ci.appveyor.com/project/ignacio/luafilesystem)
|
||||||
[](https://coveralls.io/r/keplerproject/luafilesystem)
|
[](https://coveralls.io/r/keplerproject/luafilesystem)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user