Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Add GitHub Actions for CI (#249)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
LPGhatguy committed Jan 14, 2020
1 parent deaa800 commit 31fa93d
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 31fa93d

Please sign in to comment.