From e8f1267ee3d091145b281b86548a31c89ad27d74 Mon Sep 17 00:00:00 2001 From: luau-project Date: Mon, 10 Mar 2025 07:33:12 -0300 Subject: ci(unix): fix code coverage upload --- .github/workflows/test.yml | 29 ++++++++++++++++++----------- 1 file 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: with: luaVersion: ${{ matrix.lua-version }} - - uses: leafo/gh-actions-luarocks@v4.0.0 + - uses: leafo/gh-actions-luarocks@v5 - name: 'Setup macOS deps' if: ${{ contains(matrix.os, 'macos') }} @@ -64,24 +64,31 @@ jobs: - name: Unit Test run: | - eval $(luarocks path) busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" busted -o htest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" - name: Integration Test run: | - eval $(luarocks path) busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci" busted -o htest --exclude-tags=ssh,gpg,git,unit,quick --verbose -Xhelper "lua_dir=$(luarocks config variables.LUA_DIR),ci,env=full" + + - name: Generate Coverage Report + working-directory: testrun + run: luacov -c luacov.config - - name: Coverage - run: | - eval $(luarocks path) - luacov -c testrun/luacov.config - curl -Os https://uploader.codecov.io/latest/$([ `uname -s` = "Linux" ] && echo "linux" || echo "macos")/codecov - chmod +x codecov - ( cd testrun/ && ../codecov ) - grep "Summary" -B1 -A1000 testrun/luacov.report.out + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Codecov + run: pip install codecov + + - name: Upload Coverage Report + working-directory: testrun + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: codecov -t "$CODECOV_TOKEN" -f "luacov.report.out" -X gcov ############################################################################## SmokeTest: -- cgit v1.2.3-55-g6feb