From 7be1948f6daf98c93d5dc85574fc8999502646a8 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Mon, 9 Dec 2024 14:42:32 -0600 Subject: [PATCH] Add CI --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ Makefile | 2 -- spec/emitter_spec.lua | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6131052 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: ci + +on: + pull_request: + workflow_dispatch: + push: + branches: [main] + +jobs: + Test: + strategy: + matrix: + lua-version: ["5.4", "5.3", "5.2", "5.1", "luajit"] + os: ["ubuntu-latest"] + include: + - os: "macos-latest" + lua-version: "5.4" + - os: "windows-latest" + lua-version: "luajit" + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@master + - uses: hishamhm/gh-actions-lua@master + with: + luaVersion: ${{ matrix.lua-version }} + - uses: hishamhm/gh-actions-luarocks@master + - name: Test + run: | + make dev + make all diff --git a/Makefile b/Makefile index 75d693e..8600d72 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ .PHONY: all dev gen check test -LUA := $(shell luarocks config lua_interpreter) - all: gen check test dev: diff --git a/spec/emitter_spec.lua b/spec/emitter_spec.lua index d03f26f..653e69d 100644 --- a/spec/emitter_spec.lua +++ b/spec/emitter_spec.lua @@ -1,4 +1,4 @@ -local Emitter = require("Emitter") +local Emitter = require("emitter") local Greet = {} function Greet.new(name)