From 2d5f4fa27a902b3f833cca890046f71372ca8395 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 14 Oct 2024 13:21:19 +0100 Subject: [PATCH 1/3] ci: run test suite on windows --- .github/workflows/changelogensets.yml | 5 ++++- .github/workflows/ci.yml | 7 +++++-- .github/workflows/reproduction-close.yml | 5 ++++- .github/workflows/reproduction.yml | 5 ++++- package.json | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changelogensets.yml b/.github/workflows/changelogensets.yml index 1e49bb31..abfd2959 100644 --- a/.github/workflows/changelogensets.yml +++ b/.github/workflows/changelogensets.yml @@ -16,7 +16,10 @@ concurrency: jobs: update-changelog: if: github.repository_owner == 'nuxt' && !contains(github.event.head_commit.message, 'v0.') && !contains(github.event.head_commit.message, 'v1.') - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 128f1c21..0dc46d01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,10 @@ permissions: {} jobs: ci: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - run: corepack enable @@ -45,7 +48,7 @@ jobs: - run: pnpm dev:prepare - run: pnpm lint - - run: pnpm test -- --coverage + - run: pnpm test - run: pnpm build - run: pnpm test:types - run: pnpm dev:build diff --git a/.github/workflows/reproduction-close.yml b/.github/workflows/reproduction-close.yml index 6bf5ca88..da9f4fea 100644 --- a/.github/workflows/reproduction-close.yml +++ b/.github/workflows/reproduction-close.yml @@ -9,7 +9,10 @@ permissions: jobs: stale: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with: diff --git a/.github/workflows/reproduction.yml b/.github/workflows/reproduction.yml index a866d8b1..6b5f9548 100644 --- a/.github/workflows/reproduction.yml +++ b/.github/workflows/reproduction.yml @@ -8,7 +8,10 @@ permissions: jobs: reproduire: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - uses: Hebilicious/reproduire@4b686ae9cbb72dad60f001d278b6e3b2ce40a9ac # v0.0.9-mp diff --git a/package.json b/package.json index fc503ffb..3daf4d2e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare client", "release": "pnpm lint && pnpm test && pnpm prepack && changelogen --release && npm publish && git push --follow-tags", "lint": "eslint .", - "test": "vitest run", + "test": "vitest run --coverage", "test:types": "vue-tsc --noEmit && pnpm -r test:types", "test:watch": "vitest watch" }, From f46eedd7ebc2d4afcf895df9ea3a7eaf03752143 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 14 Oct 2024 13:22:37 +0100 Subject: [PATCH 2/3] ci: reduce matrices --- .github/workflows/changelogensets.yml | 5 +---- .github/workflows/reproduction-close.yml | 5 +---- .github/workflows/reproduction.yml | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/changelogensets.yml b/.github/workflows/changelogensets.yml index abfd2959..1e49bb31 100644 --- a/.github/workflows/changelogensets.yml +++ b/.github/workflows/changelogensets.yml @@ -16,10 +16,7 @@ concurrency: jobs: update-changelog: if: github.repository_owner == 'nuxt' && !contains(github.event.head_commit.message, 'v0.') && !contains(github.event.head_commit.message, 'v1.') - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/reproduction-close.yml b/.github/workflows/reproduction-close.yml index da9f4fea..6bf5ca88 100644 --- a/.github/workflows/reproduction-close.yml +++ b/.github/workflows/reproduction-close.yml @@ -9,10 +9,7 @@ permissions: jobs: stale: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 with: diff --git a/.github/workflows/reproduction.yml b/.github/workflows/reproduction.yml index 6b5f9548..a866d8b1 100644 --- a/.github/workflows/reproduction.yml +++ b/.github/workflows/reproduction.yml @@ -8,10 +8,7 @@ permissions: jobs: reproduire: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - uses: Hebilicious/reproduire@4b686ae9cbb72dad60f001d278b6e3b2ce40a9ac # v0.0.9-mp From 0dad128c7f686445234c30c26336b1678efd2c59 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 14 Oct 2024 14:20:26 +0100 Subject: [PATCH 3/3] ci: don't upload windows coverage to codecov --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc46d01..babaadc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,5 +53,6 @@ jobs: - run: pnpm test:types - run: pnpm dev:build - uses: codecov/codecov-action@v4 + if: matrix.os != 'windows-latest' env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}