From 4ad7092abf982398c55ae96e1990f6e9fd9892bb Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 22 Nov 2020 14:41:55 -0500 Subject: [PATCH] test: Add GitHub actions support to helpers.isCI --- test/helpers.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/helpers.lua b/test/helpers.lua index 84148dc1a8..8dbd82cb8c 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -777,11 +777,12 @@ end function module.isCI(name) local any = (name == nil) - assert(any or name == 'appveyor' or name == 'travis' or name == 'sourcehut') + assert(any or name == 'appveyor' or name == 'travis' or name == 'sourcehut' or name == 'github') local av = ((any or name == 'appveyor') and nil ~= os.getenv('APPVEYOR')) local tr = ((any or name == 'travis') and nil ~= os.getenv('TRAVIS')) local sh = ((any or name == 'sourcehut') and nil ~= os.getenv('SOURCEHUT')) - return tr or av or sh + local gh = ((any or name == 'github') and nil ~= os.getenv('GITHUB_ACTIONS')) + return tr or av or sh or gh end