|
1 | 1 | name: ci |
2 | | -on: |
| 2 | +on: |
3 | 3 | push: |
4 | | - branches: |
| 4 | + branches: |
5 | 5 | - master |
6 | 6 | - next |
7 | 7 | tags: |
|
52 | 52 | path: dist*/ |
53 | 53 |
|
54 | 54 | test-package-rollup: |
55 | | - name: Test package on node ${{ matrix.node }} / ${{ matrix.os }} / rollup v${{ matrix.rollup }} |
| 55 | + name: 'rollup v${{ matrix.rollup }} / node ${{ matrix.node }} / ${{ matrix.os }}' |
56 | 56 | needs: |
57 | 57 | - build |
58 | 58 | runs-on: ubuntu-latest |
@@ -98,19 +98,72 @@ jobs: |
98 | 98 |
|
99 | 99 | - name: Install test package dependencies |
100 | 100 | run: | |
101 | | - npm install |
| 101 | + npm install |
102 | 102 | npm install rollup@${{ matrix.rollup }} --force |
103 | 103 | npx rollup -v |
104 | 104 | working-directory: test/package/rollup |
105 | 105 |
|
106 | 106 | - name: Test package |
107 | | - run: npm run test:package:rollup |
| 107 | + run: npm run test |
| 108 | + working-directory: test/package/rollup |
| 109 | + |
| 110 | + test-package-vite: |
| 111 | + name: 'vite v${{ matrix.vite }} / node ${{ matrix.node }} / ${{ matrix.os }}' |
| 112 | + needs: |
| 113 | + - build |
| 114 | + runs-on: ubuntu-latest |
| 115 | + strategy: |
| 116 | + fail-fast: false |
| 117 | + matrix: |
| 118 | + node: ['22', '20', '18'] |
| 119 | + os: [ubuntu-latest, windows-latest] |
| 120 | + vite: ['5', '6', '7'] |
| 121 | + exclude: |
| 122 | + - os: windows-latest |
| 123 | + node: 20 |
| 124 | + - os: windows-latest |
| 125 | + node: 18 |
| 126 | + - vite: 7 |
| 127 | + node: 18 |
| 128 | + steps: |
| 129 | + - name: Checkout repo |
| 130 | + uses: actions/checkout@v5.0.0 |
| 131 | + |
| 132 | + - name: Setup node & npm |
| 133 | + uses: relative-ci/.github/actions/setup-node-npm@v1.1.5 |
| 134 | + with: |
| 135 | + version: ${{ matrix.node }} |
| 136 | + cache: never |
| 137 | + install: false |
| 138 | + |
| 139 | + - name: Install vitest |
| 140 | + run: npm install vitest |
| 141 | + |
| 142 | + - name: Download build files |
| 143 | + uses: actions/download-artifact@v6.0.0 |
| 144 | + with: |
| 145 | + name: build-artifacts |
| 146 | + |
| 147 | + - name: Setup local npm registry |
| 148 | + run: ./scripts/setup-registry.sh |
| 149 | + |
| 150 | + - name: Install test package dependencies |
| 151 | + run: | |
| 152 | + npm install |
| 153 | + npm install vite@${{ matrix.vite }} --force |
| 154 | + npx vite -v |
| 155 | + working-directory: test/package/vite |
| 156 | + |
| 157 | + - name: Test package |
| 158 | + run: npm run test |
| 159 | + working-directory: test/package/vite |
108 | 160 |
|
109 | 161 | tests: |
110 | 162 | needs: |
111 | 163 | - lint |
112 | 164 | - test-unit |
113 | 165 | - test-package-rollup |
| 166 | + - test-package-vite |
114 | 167 | runs-on: ubuntu-latest |
115 | 168 | steps: |
116 | 169 | - run: exit 0 |
|
0 commit comments