From ba97e1128805fa3645885954bf47d009a11911f2 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 27 Sep 2024 14:53:06 +0200 Subject: [PATCH] Add a test workflow in GH actions 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. --- .github/workflows/test-all.yml | 24 ++++++++++++++++++++++++ Makefile | 2 +- docker-compose.yml | 2 +- tests/Makefile | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-all.yml create mode 100644 tests/Makefile diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml new file mode 100644 index 0000000..958cc8d --- /dev/null +++ b/.github/workflows/test-all.yml @@ -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 diff --git a/Makefile b/Makefile index 5a4270b..f4e6fbb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ test: - tsc -f tests/*.lua + make -C tests test test-deps: luarocks install telescope diff --git a/docker-compose.yml b/docker-compose.yml index 09935e8..1bed861 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,4 +4,4 @@ services: nats: image: nats ports: - - "4222:4222" \ No newline at end of file + - "4222:4222" diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..8f19fe7 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,2 @@ +test: + tsc -f *.lua