Skip to content

Commit

Permalink
Add a test workflow in GH actions
Browse files Browse the repository at this point in the history
The workflow is currently more limited than the existing one that
used Travis CI and tested various versions of Lua, but at least it
works and will be executed for all pushed commits and pull requests
from now on.
  • Loading branch information
rgacogne committed Sep 27, 2024
1 parent 980da7a commit ba97e11
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test features

on:
push:
pull_request:

jobs:
runner-job:
runs-on: ubuntu-latest
services:
nats:
image: nats
ports:
- "4222:4222"
steps:
- name: Install Luarocks
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install luarocks
- name: Install telescope
run: sudo luarocks install telescope
- uses: actions/checkout@v4
- name: Install deps
run: sudo make deps
- name: Test Features
run: make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
tsc -f tests/*.lua
make -C tests test

test-deps:
luarocks install telescope
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ services:
nats:
image: nats
ports:
- "4222:4222"
- "4222:4222"
2 changes: 2 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
tsc -f *.lua

0 comments on commit ba97e11

Please sign in to comment.