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 /.github | |
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 '.github')
-rw-r--r-- | .github/workflows/test.yml | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..3ddd5f18 --- /dev/null +++ b/.github/workflows/test.yml | |||
@@ -0,0 +1,104 @@ | |||
1 | name: test | ||
2 | |||
3 | on: [push] | ||
4 | |||
5 | jobs: | ||
6 | ############################################################################## | ||
7 | ShellLint: | ||
8 | runs-on: "ubuntu-latest" | ||
9 | |||
10 | steps: | ||
11 | - uses: actions/checkout@master | ||
12 | |||
13 | - name: Prep | ||
14 | run: | | ||
15 | sudo apt-get install -y shellcheck | ||
16 | |||
17 | - name: Shellcheck | ||
18 | run: | | ||
19 | shellcheck ./configure | ||
20 | |||
21 | ############################################################################## | ||
22 | LuaLint: | ||
23 | runs-on: "ubuntu-latest" | ||
24 | |||
25 | steps: | ||
26 | - uses: actions/checkout@master | ||
27 | |||
28 | - uses: leafo/gh-actions-lua@v8.0.0 | ||
29 | with: | ||
30 | luaVersion: "5.4" | ||
31 | |||
32 | - uses: leafo/gh-actions-luarocks@v4.0.0 | ||
33 | |||
34 | - name: Prep | ||
35 | run: | | ||
36 | luarocks install luacheck | ||
37 | |||
38 | - name: Luacheck | ||
39 | run: | | ||
40 | luacheck . | ||
41 | |||
42 | ############################################################################## | ||
43 | TestMatrix: | ||
44 | strategy: | ||
45 | matrix: | ||
46 | lua-version: ["5.3", "luajit"] | ||
47 | os: ["ubuntu-latest", "macos-latest"] | ||
48 | runs-on: ${{ matrix.os }} | ||
49 | |||
50 | steps: | ||
51 | - uses: actions/checkout@master | ||
52 | |||
53 | - uses: leafo/gh-actions-lua@v8.0.0 | ||
54 | with: | ||
55 | luaVersion: ${{ matrix.lua-version }} | ||
56 | |||
57 | - uses: leafo/gh-actions-luarocks@v4.0.0 | ||
58 | |||
59 | - name: Prep | ||
60 | run: | | ||
61 | luarocks install busted | ||
62 | luarocks install cluacov | ||
63 | luarocks install luacheck | ||
64 | luarocks install busted-htest | ||
65 | |||
66 | - name: Luacheck | ||
67 | run: | | ||
68 | luacheck . | ||
69 | |||
70 | - name: Unit Test | ||
71 | run: | | ||
72 | eval $(luarocks path) | ||
73 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" | ||
74 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" | ||
75 | |||
76 | - name: Integration Test | ||
77 | run: | | ||
78 | eval $(luarocks path) | ||
79 | busted -o htest --exclude-tags=ssh,gpg,git,unit --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" | ||
80 | busted -o htest --exclude-tags=ssh,gpg,git,unit --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" | ||
81 | |||
82 | - name: Coverage | ||
83 | run: | | ||
84 | eval $(luarocks path) | ||
85 | luacov -c testrun/luacov.config | ||
86 | ( cd testrun/ && bash <(curl -s https://codecov.io/bash) ) | ||
87 | grep "Summary" -B1 -A1000 testrun/luacov.report.out | ||
88 | |||
89 | ############################################################################## | ||
90 | SmokeTest: | ||
91 | runs-on: "ubuntu-latest" | ||
92 | steps: | ||
93 | - uses: actions/checkout@master | ||
94 | |||
95 | - uses: leafo/gh-actions-lua@v8.0.0 | ||
96 | with: | ||
97 | luaVersion: "5.3" | ||
98 | |||
99 | - name: Smoke Test | ||
100 | run: | | ||
101 | ./configure | ||
102 | ./makedist dev | ||
103 | ./smoke_test.sh luarocks-dev.tar.gz | ||
104 | |||