|
8 | 8 |
|
9 | 9 | strategy: |
10 | 10 | matrix: |
11 | | - node: [14] |
12 | | - react: [ |
13 | | - 16.x, |
14 | | - 17.x, |
15 | | - 18.x, |
16 | | - beta |
17 | | - ] |
18 | | - fontawesome-svg-core: [ |
19 | | - 1.2.x, |
20 | | - 6.x |
21 | | - ] |
22 | | - free-solid-svg-icons: [ |
23 | | - 5.x, |
24 | | - 6.x |
25 | | - ] |
| 11 | + free-solid-svg-icons: [7.x, 6.x, 5.x] |
| 12 | + fontawesome-svg-core: [7.x, 6.x, 1.2.x] |
| 13 | + node-version: [20.x, 18.x] |
| 14 | + react: [19.x, 18.x, 17.x, 16.x] |
| 15 | + exclude: |
| 16 | + # For v7.x core, allow all icon versions |
| 17 | + # For v6.x and v1.2.x core, exclude v7.x icons |
| 18 | + - free-solid-svg-icons: '7.x' |
| 19 | + fontawesome-svg-core: '6.x' |
| 20 | + - free-solid-svg-icons: '7.x' |
| 21 | + fontawesome-svg-core: '1.2.x' |
26 | 22 |
|
27 | 23 | steps: |
28 | 24 | - uses: actions/checkout@v1 |
29 | | - - uses: actions/setup-node@v1 |
| 25 | + |
| 26 | + - name: Use Node.js ${{ matrix.node-version }} |
| 27 | + uses: actions/setup-node@v1 |
30 | 28 | with: |
31 | | - node-version: ${{ matrix.node }} |
32 | | - - name: npm install, build, and test |
| 29 | + node-version: ${{ matrix.node-version }} |
| 30 | + |
| 31 | + - name: v7 core and icons install, build, and test |
| 32 | + if: ${{ matrix.fontawesome-svg-core == '7.x' && matrix.free-solid-svg-icons == '7.x' }} |
33 | 33 | run: | |
34 | | - npm install |
| 34 | + # Install base dependencies first |
| 35 | + npm install --no-audit --no-save |
| 36 | + # Install specific React version and its peer dependencies |
| 37 | + npm install --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }} react-test-renderer@${{ matrix.react }} |
| 38 | + # Install v7 alpha packages from local tarballs |
| 39 | + npm install --no-save ./fortawesome-fontawesome-svg-core-7.0.0-alpha8.tgz ./fortawesome-fontawesome-common-types-7.0.0-alpha8.tgz ./fortawesome-free-solid-svg-icons-7.0.0-alpha8.tgz |
| 40 | + # Verify React version |
| 41 | + npm list react react-dom react-test-renderer |
| 42 | + # Build and test |
35 | 43 | npm run build |
| 44 | + npm run lint |
| 45 | + npm run test |
| 46 | +
|
| 47 | + - name: v7 core with v5/v6 icons install, build, and test |
| 48 | + if: ${{ matrix.fontawesome-svg-core == '7.x' && matrix.free-solid-svg-icons != '7.x' }} |
| 49 | + run: | |
| 50 | + # Install base dependencies first |
| 51 | + npm install --no-audit --no-save |
| 52 | + # Install specific React version and its peer dependencies |
36 | 53 | npm install --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }} react-test-renderer@${{ matrix.react }} |
| 54 | + # Install v7 core and common types from local tarballs, but icons from npm |
| 55 | + npm install --no-save ./fortawesome-fontawesome-svg-core-7.0.0-alpha8.tgz ./fortawesome-fontawesome-common-types-7.0.0-alpha8.tgz |
| 56 | + npm install --no-save @fortawesome/free-solid-svg-icons@${{ matrix.free-solid-svg-icons }} |
| 57 | + # Verify React version |
| 58 | + npm list react react-dom react-test-renderer |
| 59 | + # Build and test |
| 60 | + npm run build |
| 61 | + npm run lint |
| 62 | + npm run test |
| 63 | +
|
| 64 | + - name: v6/v1.2.x install, build, and test |
| 65 | + if: ${{ matrix.fontawesome-svg-core != '7.x' }} |
| 66 | + run: | |
| 67 | + # Install base dependencies first |
| 68 | + npm install --no-audit --no-save |
| 69 | + # Install specific React version and its peer dependencies |
| 70 | + npm install --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }} react-test-renderer@${{ matrix.react }} |
| 71 | + # Install Font Awesome packages from npm |
37 | 72 | npm install --no-save @fortawesome/fontawesome-svg-core@${{ matrix.fontawesome-svg-core }} @fortawesome/free-solid-svg-icons@${{ matrix.free-solid-svg-icons }} |
38 | | - npm list react react-dom react-test-renderer @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons |
| 73 | + # Verify React version |
| 74 | + npm list react react-dom react-test-renderer |
| 75 | + # Build and test |
| 76 | + npm run build |
39 | 77 | npm run lint |
40 | 78 | npm run test |
| 79 | +
|
41 | 80 | - name: dist |
42 | 81 | run: | |
43 | 82 | npm run dist |
0 commit comments