From 31fa93dcd879504b48fbea7bcfe35becdcbb253e Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Tue, 14 Jan 2020 13:55:16 -0800 Subject: [PATCH] Add GitHub Actions for CI (#249) * First stab at GitHub Actions workflow * Submodules please * Different coverage reporting * Use luacov-coveralls master * Try explicitly installing luacov-coveralls from master * secret * Secrets take 2 * Try using dedicated secret * go back to GitHub token * Service name github * Explain weird coveralls config --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..8cc34318 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + with: + submodules: true + + - uses: leafo/gh-actions-lua@v5 + with: + luaVersion: "5.1" + + - uses: leafo/gh-actions-luarocks@v2 + + - name: Install dependencies + run: | + luarocks install luafilesystem + luarocks install luacov + luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev + luarocks install luacheck + + - name: Test + run: | + lua -lluacov bin/spec.lua + luacheck src benchmarks examples + + # luacov-coveralls default settings do not function on GitHub Actions. + # We need to pass different service name and repo token explicitly + - name: Report to Coveralls + run: luacov-coveralls --repo-token $REPO_TOKEN --service-name github + env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file