From 1364eec48669d78c99f27580de0f21c2d57a2988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sun, 17 Nov 2024 11:14:14 +0100 Subject: [PATCH 1/4] ci: codecov v5 --- .github/workflows/ci-packages.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index f27f8dc64..68f6e5d23 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -85,7 +85,7 @@ jobs: # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: ☂️ Codecov upload (only node-20) - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 if: matrix.node-version == '20.x' with: fail_ci_if_error: true # optional (default = false) @@ -109,10 +109,9 @@ jobs: if: matrix.node-version == '20.x' run: yarn playwright install chrome - # @todo make this working - #- name: 🧪 Unit tests (playwright chrome - only node 20.x) - # if: matrix.node-version == '20.x' - # run: yarn nx run-many --target=test-unit-browser --exclude='examples/**' --exclude='docs' + - name: 🧪 Unit tests (playwright chrome - only node 20.x) + if: matrix.node-version == '20.x' + run: yarn nx run-many --target=test-unit-browser --exclude='examples/**' --exclude='docs' - name: 🏗 Build packages run: yarn nx run-many --target=build --exclude='examples/**' --exclude='docs' From 5fd57c29fbb917b947e1c7f07c305d1964ebf7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sun, 17 Nov 2024 11:18:36 +0100 Subject: [PATCH 2/4] ci: fix codecov upload --- .github/workflows/ci-packages.yml | 48 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 68f6e5d23..65301df00 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -8,6 +8,10 @@ on: types: [opened, synchronize, reopened, ready_for_review] branches: - '**' + pull_request_target: + types: [opened, synchronize, reopened, ready_for_review] + branches: + - '**' permissions: contents: read @@ -74,29 +78,29 @@ jobs: if: matrix.node-version == '20.x' run: yarn nx run-many --target=test-unit-coverage --exclude='examples/**' --exclude='docs' - #- name: ☂️ Codecov upload (only node-20) - # if: matrix.node-version == '20.x' - # working-directory: ${{ github.workspace }} - # run: | - # bash .github/scripts/install-codecov.sh - # yarn g:ci-coverage-upload - # shell: bash - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: ☂️ Codecov upload (only node-20) - uses: codecov/codecov-action@v5 if: matrix.node-version == '20.x' - with: - fail_ci_if_error: true # optional (default = false) - #files: ./coverage1.xml,./coverage2.xml # optional - #flags: unittests # optional - flags: httpx-exception-unit,httpx-dsn-parser-unit,httpx-memo-intl-unit,httpx-plain-object-unit,httpx-assert-unit,httpx-json-api-unit,httpx-treeu-unit - #name: codecov-umbrella # optional - verbose: true # optional (default = false) + working-directory: ${{ github.workspace }} + run: | + bash .github/scripts/install-codecov.sh + yarn g:ci-coverage-upload + shell: bash env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + #- name: ☂️ Codecov upload (only node-20) + # uses: codecov/codecov-action@v5 + # if: matrix.node-version == '20.x' + # with: + # fail_ci_if_error: true # optional (default = false) + # #files: ./coverage1.xml,./coverage2.xml # optional + # #flags: unittests # optional + # flags: httpx-exception-unit,httpx-dsn-parser-unit,httpx-memo-intl-unit,httpx-plain-object-unit,httpx-assert-unit,httpx-json-api-unit,httpx-treeu-unit + # #name: codecov-umbrella # optional + # verbose: true # optional (default = false) + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: 🧪 Unit tests (edge-runtime) if: matrix.node-version == '20.x' run: yarn nx run-many --target=test-unit-edge --exclude='examples/**' --exclude='docs' @@ -105,9 +109,11 @@ jobs: if: matrix.node-version == '20.x' run: yarn nx run-many --target=test-unit-cloudflare --exclude='examples/**' --exclude='docs' - - name: ⚙️ Install Playwright Chrome (only node 20.x) - if: matrix.node-version == '20.x' - run: yarn playwright install chrome + # @todo: Uncomment when the playwright install is working on CI + # > browserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1140/chrome-linux/chrome + #- name: ⚙️ Install Playwright Chrome (only node 20.x) + # if: matrix.node-version == '20.x' + # run: yarn playwright install chrome - name: 🧪 Unit tests (playwright chrome - only node 20.x) if: matrix.node-version == '20.x' From 893ff7b4fe95a71fbcbecfd2c4b8943fa2020b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sun, 17 Nov 2024 11:23:08 +0100 Subject: [PATCH 3/4] ci: fix codecov upload --- .github/workflows/ci-packages.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 65301df00..04b83d519 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -109,15 +109,15 @@ jobs: if: matrix.node-version == '20.x' run: yarn nx run-many --target=test-unit-cloudflare --exclude='examples/**' --exclude='docs' + - name: ⚙️ Install Playwright Chrome (only node 20.x) + if: matrix.node-version == '20.x' + run: yarn playwright install chrome + # @todo: Uncomment when the playwright install is working on CI # > browserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1140/chrome-linux/chrome - #- name: ⚙️ Install Playwright Chrome (only node 20.x) + #- name: 🧪 Unit tests (playwright chrome - only node 20.x) # if: matrix.node-version == '20.x' - # run: yarn playwright install chrome - - - name: 🧪 Unit tests (playwright chrome - only node 20.x) - if: matrix.node-version == '20.x' - run: yarn nx run-many --target=test-unit-browser --exclude='examples/**' --exclude='docs' + # run: yarn nx run-many --target=test-unit-browser --exclude='examples/**' --exclude='docs' - name: 🏗 Build packages run: yarn nx run-many --target=build --exclude='examples/**' --exclude='docs' From 4ac81d8b7317a02bb601df709fda00954ecd9cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sun, 17 Nov 2024 11:23:59 +0100 Subject: [PATCH 4/4] ci: fix codecov upload --- .github/workflows/ci-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 04b83d519..dfa2a3c33 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -85,8 +85,8 @@ jobs: bash .github/scripts/install-codecov.sh yarn g:ci-coverage-upload shell: bash - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} #- name: ☂️ Codecov upload (only node-20) # uses: codecov/codecov-action@v5