Add Fonts to package #16
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: Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # Remove cache to avoid optional dependency issues | |
| - name: Install dependencies | |
| run: | | |
| # Remove package-lock to ensure fresh install | |
| rm -f package-lock.json | |
| # Use npm install instead of npm ci for better optional dependency handling | |
| npm install | |
| - name: Check scripts directory | |
| run: | | |
| echo "=== Current directory ===" | |
| pwd | |
| echo "=== Scripts directory contents ===" | |
| ls -la scripts/ | |
| echo "=== Checking if generate scripts exist ===" | |
| test -f scripts/generate-shades-css.js && echo "✅ generate-shades-css.js exists" || echo "❌ generate-shades-css.js missing" | |
| test -f scripts/generate-daisyUI-css.js && echo "✅ generate-daisyUI-css.js exists" || echo "❌ generate-daisyUI-css.js missing" | |
| test -f scripts/generate-fonts-css.js && echo "✅ generate-fonts-css.js exists" || echo "❌ generate-fonts-css.js missing" | |
| - name: Build package | |
| run: npm run build | |
| - name: Run linting | |
| run: npm run lint --if-present | |
| - name: Run tests | |
| run: npm test --if-present | |
| - name: Check package contents | |
| run: | | |
| echo "=== Generated CSS Files ===" | |
| ls -la dist/ | |
| echo "=== Checking for expected CSS files ===" | |
| test -f dist/dmun-tailwind-shades.css && echo "✅ dmun-tailwind-shades.css exists" || echo "❌ dmun-tailwind-shades.css missing" | |
| test -f dist/dmun-daisyUI-light.css && echo "✅ dmun-daisyUI-light.css exists" || echo "❌ dmun-daisyUI-light.css missing" | |
| test -f dist/dmun-daisyUI-dark.css && echo "✅ dmun-daisyUI-dark.css exists" || echo "❌ dmun-daisyUI-dark.css missing" | |
| test -f dist/dmun-fonts.css && echo "✅ dmun-fonts.css exists" || echo "❌ dmun-fonts.css missing" | |
| echo "=== Generated Library Files ===" | |
| ls -la lib/ | |
| echo "=== Package contents preview ===" | |
| npm pack --dry-run |