Skip to content

Commit

Permalink
build: Run tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
vio committed Aug 10, 2023
1 parent ae13eb5 commit 977c840
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,20 @@ jobs:
test-package-cli:
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [20, 18, 16, 14]
name: CLI nodejs ${{ matrix.version }}
os: [windows-latest, ubuntu-latest]
node: [20, 18, 16, 14]
exclude:
- os: windows-latest
node: 20
- os: windows-latest
node: 18
- os: windows-latest
node: 16
runs-on: ${{ matrix.os }}
name: CLI ${{ matrix.os }} nodejs ${{ matrix.node }}
steps:
- uses: actions/checkout@v3

Expand All @@ -174,7 +182,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.version }}
node-version: ${{ matrix.node }}
cache: ${{ steps.cache.outputs.PACKAGE }}

- name: Download build files
Expand All @@ -198,25 +206,32 @@ jobs:
test-package-webpack-plugin:
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [20, 18, 16, 14]
os: [windows-latest, ubuntu-latest]
node: [20, 18, 16, 14]
webpack: ['webpack4', 'webpack5']
exclude:
- webpack: 'webpack4'
version: 18
node: 18
- webpack: 'webpack4'
version: 20
name: ${{ matrix.webpack }} plugin nodejs ${{ matrix.version }}
node: 20
- os: windows-latest
node: 20
- os: windows-latest
node: 18
- os: windows-latest
node: 16
runs-on: ${{ matrix.os }}
name: ${{ matrix.webpack }} plugin ${{ matrix.os }} nodejs ${{ matrix.node }}
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3.7.0
with:
node-version: ${{ matrix.version }}
node-version: ${{ matrix.node }}

- name: Download build files
uses: actions/download-artifact@v3
Expand All @@ -236,23 +251,16 @@ jobs:
run: npm run test:package -- -t ${{ matrix.webpack }}
working-directory: packages/webpack-plugin

tests:
publish:
# Run only for version tags
if: contains(github.ref, 'refs/tags/v')
needs:
- lint
- test-unit
- test-e2e
- test-package-cli
- test-package-webpack-plugin
runs-on: ubuntu-latest
steps:
- run: echo "Tests done."

publish:
# Run only for version tags
if: contains(github.ref, 'refs/tags/v')
needs:
- tests
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
Expand Down

0 comments on commit 977c840

Please sign in to comment.