diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-02-17 01:14:56 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-02-17 12:47:25 -0300 |
commit | 9e22f32dd442d7c95766aca54ceea9833efa4f9d (patch) | |
tree | be08ed8f41797e4c6038d51336bdc033301d4ad1 /spec | |
parent | 6c524b4a1b9fec2fe4abf03fa83b8d6624c23e26 (diff) | |
download | luarocks-9e22f32dd442d7c95766aca54ceea9833efa4f9d.tar.gz luarocks-9e22f32dd442d7c95766aca54ceea9833efa4f9d.tar.bz2 luarocks-9e22f32dd442d7c95766aca54ceea9833efa4f9d.zip |
tests: remove Travis CI, add Github Actions
Diffstat (limited to 'spec')
-rw-r--r-- | spec/README.md | 8 | ||||
-rw-r--r-- | spec/util/test_env.lua | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/README.md b/spec/README.md index 46372b19..b55550e6 100644 --- a/spec/README.md +++ b/spec/README.md | |||
@@ -3,14 +3,14 @@ | |||
3 | 3 | ||
4 | ## Overview | 4 | ## Overview |
5 | 5 | ||
6 | Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/). | 6 | Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/). |
7 | 7 | ||
8 | * Contains unit & integration tests | 8 | * Contains unit & integration tests |
9 | * Easy setup for your purpose on command line or from configuration file | 9 | * Easy setup for your purpose on command line or from configuration file |
10 | 10 | ||
11 | ## Dependencies | 11 | ## Dependencies |
12 | 12 | ||
13 | * Lua >= 5.1 | 13 | * Lua >= 5.1 |
14 | * Busted with dependencies | 14 | * Busted with dependencies |
15 | 15 | ||
16 | ## Usage | 16 | ## Usage |
@@ -26,8 +26,8 @@ LuaRocks folder or specify with *-C* flag. | |||
26 | env=<type>, (default:"minimal") type what kind of environment to use ["minimal", "full"] | 26 | env=<type>, (default:"minimal") type what kind of environment to use ["minimal", "full"] |
27 | noreset, Don't reset environment after each test | 27 | noreset, Don't reset environment after each test |
28 | clean, remove existing testing environment | 28 | clean, remove existing testing environment |
29 | appveyor, add just if running on TravisCI | 29 | appveyor, add just if running on Appveyor |
30 | travis, add just if running on TravisCI | 30 | ci, add just if running on Unix CI |
31 | os=<version>, type your OS ["linux", "os x", "windows"] | 31 | os=<version>, type your OS ["linux", "os x", "windows"] |
32 | ``` | 32 | ``` |
33 | --------------------------------------------------------------------------------------------- | 33 | --------------------------------------------------------------------------------------------- |
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index c40921cc..737d90a5 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -17,7 +17,7 @@ ARGUMENTS | |||
17 | default: "minimal"). | 17 | default: "minimal"). |
18 | noreset Don't reset environment after each test | 18 | noreset Don't reset environment after each test |
19 | clean Remove existing testing environment. | 19 | clean Remove existing testing environment. |
20 | travis Add if running on TravisCI. | 20 | ci Add if running on Unix CI. |
21 | appveyor Add if running on Appveyor. | 21 | appveyor Add if running on Appveyor. |
22 | os=<type> Set OS ("linux", "osx", or "windows"). | 22 | os=<type> Set OS ("linux", "osx", or "windows"). |
23 | lua_dir=<path> Path of Lua installation (default "/usr/local") | 23 | lua_dir=<path> Path of Lua installation (default "/usr/local") |
@@ -238,8 +238,8 @@ function test_env.set_args() | |||
238 | test_env.TEST_ENV_CLEAN = true | 238 | test_env.TEST_ENV_CLEAN = true |
239 | elseif argument == "verbose" then | 239 | elseif argument == "verbose" then |
240 | test_env.VERBOSE = true | 240 | test_env.VERBOSE = true |
241 | elseif argument == "travis" then | 241 | elseif argument == "ci" then |
242 | test_env.TRAVIS = true | 242 | test_env.CI = true |
243 | elseif argument == "appveyor" then | 243 | elseif argument == "appveyor" then |
244 | test_env.APPVEYOR = true | 244 | test_env.APPVEYOR = true |
245 | elseif argument:find("^os=") then | 245 | elseif argument:find("^os=") then |
@@ -273,13 +273,13 @@ function test_env.set_args() | |||
273 | local system = execute_output("uname -s") | 273 | local system = execute_output("uname -s") |
274 | if system == "Linux" then | 274 | if system == "Linux" then |
275 | test_env.TEST_TARGET_OS = "linux" | 275 | test_env.TEST_TARGET_OS = "linux" |
276 | if test_env.TRAVIS then | 276 | if test_env.CI then |
277 | test_env.OPENSSL_INCDIR = "/usr/include" | 277 | test_env.OPENSSL_INCDIR = "/usr/include" |
278 | test_env.OPENSSL_LIBDIR = "/usr/lib/x86_64-linux-gnu" | 278 | test_env.OPENSSL_LIBDIR = "/usr/lib/x86_64-linux-gnu" |
279 | end | 279 | end |
280 | elseif system == "Darwin" then | 280 | elseif system == "Darwin" then |
281 | test_env.TEST_TARGET_OS = "osx" | 281 | test_env.TEST_TARGET_OS = "osx" |
282 | if test_env.TRAVIS then | 282 | if test_env.CI then |
283 | test_env.OPENSSL_INCDIR = "/usr/local/opt/openssl/include" | 283 | test_env.OPENSSL_INCDIR = "/usr/local/opt/openssl/include" |
284 | test_env.OPENSSL_LIBDIR = "/usr/local/opt/openssl/lib" | 284 | test_env.OPENSSL_LIBDIR = "/usr/local/opt/openssl/lib" |
285 | end | 285 | end |
@@ -643,7 +643,7 @@ end | |||
643 | function test_env.setup_specs(extra_rocks) | 643 | function test_env.setup_specs(extra_rocks) |
644 | -- if global variable about successful creation of testing environment doesn't exist, build environment | 644 | -- if global variable about successful creation of testing environment doesn't exist, build environment |
645 | if not test_env.setup_done then | 645 | if not test_env.setup_done then |
646 | if test_env.TRAVIS then | 646 | if test_env.CI then |
647 | if not test_env.exists(os.getenv("HOME") .. "/.ssh/id_rsa.pub") then | 647 | if not test_env.exists(os.getenv("HOME") .. "/.ssh/id_rsa.pub") then |
648 | execute_bool("ssh-keygen -t rsa -P \"\" -f ~/.ssh/id_rsa") | 648 | execute_bool("ssh-keygen -t rsa -P \"\" -f ~/.ssh/id_rsa") |
649 | execute_bool("cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys") | 649 | execute_bool("cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys") |