diff --git a/.github/workflows/experimental.ci.yaml b/.github/workflows/experimental.ci.yaml index 619961893d..37fceb03d2 100644 --- a/.github/workflows/experimental.ci.yaml +++ b/.github/workflows/experimental.ci.yaml @@ -157,11 +157,51 @@ jobs: - name: Remove non-test dependencies run: npm rm --silent --save-dev connect-redis - - name: Run tests - run: npm test - - name: Output Node and NPM versions run: | echo "Node.js version: $(node -v)" echo "NPM version: $(npm -v)" + - name: Run tests + shell: bash + run: | + npm run test-ci + cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov" + + - name: Collect code coverage + run: | + mv ./coverage "./${{ matrix.name }}" + mkdir ./coverage + mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}" + + - name: Upload code coverage + uses: actions/upload-artifact@v3 + with: + name: coverage + path: ./coverage + retention-days: 1 + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install lcov + shell: bash + run: sudo apt-get -y install lcov + + - name: Collect coverage reports + uses: actions/download-artifact@v3 + with: + name: coverage + path: ./coverage + + - name: Merge coverage reports + shell: bash + run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info + + - name: Upload coverage report + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }}