diff options
author | luau-project <luau.project@gmail.com> | 2025-03-10 07:33:12 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2025-03-10 13:49:59 +0000 |
commit | e8f1267ee3d091145b281b86548a31c89ad27d74 (patch) | |
tree | 3e854f9e1e8a15ae1f7a478b2921b1b3075d0e29 | |
parent | e129b71100a269a46c65884cafa8dd64b5b8cbcd (diff) | |
download | luarocks-e8f1267ee3d091145b281b86548a31c89ad27d74.tar.gz luarocks-e8f1267ee3d091145b281b86548a31c89ad27d74.tar.bz2 luarocks-e8f1267ee3d091145b281b86548a31c89ad27d74.zip |
ci(unix): fix code coverage upload
-rw-r--r-- | .github/workflows/test.yml | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1479d661..4df13f68 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -45,7 +45,7 @@ jobs: | |||
45 | with: | 45 | with: |
46 | luaVersion: ${{ matrix.lua-version }} | 46 | luaVersion: ${{ matrix.lua-version }} |
47 | 47 | ||
48 | - uses: leafo/gh-actions-luarocks@v4.0.0 | 48 | - uses: leafo/gh-actions-luarocks@v5 |
49 | 49 | ||
50 | - name: 'Setup macOS deps' | 50 | - name: 'Setup macOS deps' |
51 | if: ${{ contains(matrix.os, 'macos') }} | 51 | if: ${{ contains(matrix.os, 'macos') }} |
@@ -64,24 +64,31 @@ jobs: | |||
64 | 64 | ||
65 | - name: Unit Test | 65 | - name: Unit Test |
66 | run: | | 66 | run: | |
67 | eval $(luarocks path) | ||
68 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" | 67 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" |
69 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" | 68 | busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" |
70 | 69 | ||
71 | - name: Integration Test | 70 | - name: Integration Test |
72 | run: | | 71 | run: | |
73 | eval $(luarocks path) | ||
74 | busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" | 72 | busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" |
75 | busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" | 73 | busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" |
74 | |||
75 | - name: Generate Coverage Report | ||
76 | working-directory: testrun | ||
77 | run: luacov -c luacov.config | ||
76 | 78 | ||
77 | - name: Coverage | 79 | - name: Setup Python |
78 | run: | | 80 | uses: actions/setup-python@v5 |
79 | eval $(luarocks path) | 81 | with: |
80 | luacov -c testrun/luacov.config | 82 | python-version: '3.11' |
81 | curl -Os https://uploader.codecov.io/latest/$([ `uname -s` = "Linux" ] && echo "linux" || echo "macos")/codecov | 83 | |
82 | chmod +x codecov | 84 | - name: Install Codecov |
83 | ( cd testrun/ && ../codecov ) | 85 | run: pip install codecov |
84 | grep "Summary" -B1 -A1000 testrun/luacov.report.out | 86 | |
87 | - name: Upload Coverage Report | ||
88 | working-directory: testrun | ||
89 | env: | ||
90 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
91 | run: codecov -t "$CODECOV_TOKEN" -f "luacov.report.out" -X gcov | ||
85 | 92 | ||
86 | ############################################################################## | 93 | ############################################################################## |
87 | SmokeTest: | 94 | SmokeTest: |