From c24b804e8154ae8beb50d9932c8e6451a46f075b Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 13:35:14 +0300 Subject: [PATCH 1/9] chore: enable coveralls reporting --- .github/workflows/check-test.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 91e0c636..ca5aa9e9 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -104,3 +104,17 @@ jobs: - name: Run Tests run: npm run test-ci -- --stream shell: bash + + - name: Report Coverage + if: ${{ runner.os == 'Linux' }} + run: | + curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin + coverage_reports=(ls packages/*/coverage/lcov.info) + for report in "${coverage_reports[@]}"; do + flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<< $report) + coverage report --base-path . --job-flag=$flag_name $report + done + env: + COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} + COVERALLS_REPO_TOKEN: ${{ github.token }} + COVERALLS_GIT_COMMIT: ${{ github.sha }} From 748c9c431da23587fa2a1b4e91a297811b198fc3 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 13:48:30 +0300 Subject: [PATCH 2/9] fix command name --- .github/workflows/check-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index ca5aa9e9..d2a443a1 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -112,7 +112,7 @@ jobs: coverage_reports=(ls packages/*/coverage/lcov.info) for report in "${coverage_reports[@]}"; do flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<< $report) - coverage report --base-path . --job-flag=$flag_name $report + coveralls report --base-path . --job-flag=$flag_name $report done env: COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} From 177bf60b26e2ae4176d3a930f5fcc66ca0d71fea Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 14:08:42 +0300 Subject: [PATCH 3/9] fix shell script --- .github/workflows/check-test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index d2a443a1..fd40a539 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -109,9 +109,10 @@ jobs: if: ${{ runner.os == 'Linux' }} run: | curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C /usr/local/bin - coverage_reports=(ls packages/*/coverage/lcov.info) + coverage_reports=(packages/*/coverage/lcov.info) for report in "${coverage_reports[@]}"; do - flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<< $report) + echo "Processing report: $report" + flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<<$report) coveralls report --base-path . --job-flag=$flag_name $report done env: From 08fe66c8a00fe692675cfee02050581afca8fd1a Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 14:26:23 +0300 Subject: [PATCH 4/9] use parallel --- .github/workflows/check-test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index fd40a539..3e1ddbb3 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -113,8 +113,10 @@ jobs: for report in "${coverage_reports[@]}"; do echo "Processing report: $report" flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<<$report) - coveralls report --base-path . --job-flag=$flag_name $report + coveralls report --base-path . --job-flag=$flag_name $report --parallel --service-name github-actions done + + coveralls done env: COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} COVERALLS_REPO_TOKEN: ${{ github.token }} From ff62f94738ea230662f0a8ea58b0c7f4be06a2da Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 14:44:45 +0300 Subject: [PATCH 5/9] clean up --- .github/workflows/check-test.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 3e1ddbb3..e15a6668 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -1,11 +1,9 @@ # This action runs lint checks and tests against the code. name: Check and Test -# Controls when the action will run. on: pull_request: - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: push: branches: @@ -18,7 +16,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: check-and-test: name: Check and Test @@ -28,10 +25,8 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - fail-fast: false - # The type of runner that the job will run on runs-on: ${{ matrix.os }} # Steps represent a sequence of tasks that will be executed as part of the job @@ -51,11 +46,11 @@ jobs: if: ${{ runner.os == 'Linux' }} run: sudo apt-get -y update && sudo apt-get -y install libkrb5-dev libsecret-1-dev net-tools libstdc++6 gnome-keyring - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -95,9 +90,6 @@ jobs: shell: bash - name: Run Checks - # We exclude dependents when running eslint and depchecks because - # linting and dependency checking is relevant only for packages where - # the source code was changed run: npm run check-ci -- --stream shell: bash From 0b34b86139050199efc4d1bd195a31fe972b69e6 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 14:55:38 +0300 Subject: [PATCH 6/9] remove commit argument --- .github/workflows/check-test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index e15a6668..4493b27a 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -112,4 +112,3 @@ jobs: env: COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} COVERALLS_REPO_TOKEN: ${{ github.token }} - COVERALLS_GIT_COMMIT: ${{ github.sha }} From 88262868404601eb28b8bd52b802d978e5e76174 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 15:36:53 +0300 Subject: [PATCH 7/9] try to get the commit right --- .github/workflows/check-test.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 4493b27a..12092f78 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -58,9 +58,6 @@ jobs: node-version: 20.x cache: "npm" - - name: Install npm - run: npm install -g npm@9 - - name: Use python@3.11 # Default Python (3.12) doesn't have support for distutils # https://github.com/nodejs/node-gyp/issues/2869 @@ -105,10 +102,11 @@ jobs: for report in "${coverage_reports[@]}"; do echo "Processing report: $report" flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<<$report) - coveralls report --base-path . --job-flag=$flag_name $report --parallel --service-name github-actions + coveralls report --base-path . --job-flag=$flag_name $report --parallel --no-logo --debug done coveralls done env: COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} COVERALLS_REPO_TOKEN: ${{ github.token }} + COVERALLS_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From 6e4e7da1b0d889394c76c1694195b4be1b404a70 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 16:11:56 +0300 Subject: [PATCH 8/9] fix env variable name --- .github/workflows/check-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 12092f78..2cdfb85e 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -109,4 +109,4 @@ jobs: env: COVERALLS_GIT_BRANCH: ${{ github.head_ref || github.ref_name }} COVERALLS_REPO_TOKEN: ${{ github.token }} - COVERALLS_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From cfdb85f53c4d10d2f7d465268190977c33e37c7d Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 31 Mar 2025 16:37:59 +0300 Subject: [PATCH 9/9] remove --debug --- .github/workflows/check-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-test.yaml b/.github/workflows/check-test.yaml index 2cdfb85e..e61714b3 100644 --- a/.github/workflows/check-test.yaml +++ b/.github/workflows/check-test.yaml @@ -102,7 +102,7 @@ jobs: for report in "${coverage_reports[@]}"; do echo "Processing report: $report" flag_name=$(sed -E 's/packages\/([^\/]*)\/coverage\/lcov.info/\1/g' <<<$report) - coveralls report --base-path . --job-flag=$flag_name $report --parallel --no-logo --debug + coveralls report --base-path . --job-flag=$flag_name $report --parallel --no-logo done coveralls done