Rewrite library with TypeScript, update to modern React & Jest conventions #414
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| free-solid-svg-icons: [7.x, 6.x] | |
| fontawesome-svg-core: [7.x, 6.x] | |
| node-version: [24.x, 22.x, 20.x] | |
| react: [19.x, 18.x] | |
| exclude: | |
| # For v7.x core, allow all icon versions | |
| # For v6.x exclude v7.x icons | |
| - free-solid-svg-icons: '7.x' | |
| fontawesome-svg-core: '6.x' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: https://npm.fontawesome.com/ | |
| scope: '@fortawesome' | |
| cache: 'npm' | |
| - name: Install base dependencies | |
| run: npm ci --no-audit --no-save | |
| env: | |
| FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.NPM_CONFIG_FONT_AWESOME_TOKEN }} | |
| - name: Install React dependencies | |
| run: npm ci --no-save react@${{ matrix.react }} react-dom@${{ matrix.react }} | |
| env: | |
| FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.NPM_CONFIG_FONT_AWESOME_TOKEN }} | |
| - name: Install FontAwesome dependencies | |
| run: npm ci --no-save @fortawesome/fontawesome-svg-core@${{ matrix.fontawesome-svg-core }} @fortawesome/free-solid-svg-icons@${{ matrix.free-solid-svg-icons }} | |
| env: | |
| FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.NPM_CONFIG_FONT_AWESOME_TOKEN }} | |
| - name: Verify React version | |
| run: npm list react react-dom | |
| - name: Lint and test | |
| run: | | |
| npm run lint | |
| npm run format:check | |
| npm run test | |
| - name: Build | |
| run: npm run build | |
| - name: Build distribution | |
| run: npm run dist |