Update dependency vite to v6 #24435
This file contains 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: "Test" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Lint | |
run: yarn biome ci --reporter=github | |
- name: Prettier | |
run: yarn run prettier:ci | |
- name: Stylelint | |
run: yarn run lint:style | |
- name: Check no import from src | |
run: | | |
if find ./packages -type f \( -iname \*.ts -o -iname \*.tsx \) -exec grep "@salt-ds/.*/src" {} +; then | |
echo "Should not import from src in any typescript file" | |
exit 1; | |
fi | |
dependency-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Check build core package.json dependencies | |
run: | | |
if grep -q "@salt-ds\/\(core\|lab\)\":" dist/salt-ds-core/package.json; then | |
echo "Core package can not reference itself or lab package" | |
exit 1; | |
fi | |
- name: Check build icon package.json dependencies | |
run: | | |
if grep -q "@salt-ds\/\(icon\|core\|lab\)\":" dist/salt-ds-icon/package.json; then | |
echo "Icon package can not reference itself or core or lab package" | |
exit 1; | |
fi | |
- name: Check build lab package.json dependencies | |
run: | | |
if grep -q "@salt-ds\/lab\":" dist/salt-ds-lab/package.json; then | |
echo "Lab package can not reference itself" | |
exit 1; | |
fi | |
type-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- run: yarn run typecheck | |
jest-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- run: yarn run test | |
cypress-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
react: [16, 17, 18] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Setup react | |
run: yarn up react@${{ matrix.react }} react-dom@${{ matrix.react }} | |
- name: Build packages | |
run: yarn run build | |
- name: Cypress Components | |
uses: cypress-io/github-action@v6 | |
with: | |
install: false | |
command: yarn run test:components | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots |