(fix): use default theme for docs #38
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: Yarn Install and Test | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - uses: actions/checkout@v4 | |
| # Set up Node.js environment | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| registry-url: "https://registry.npmjs.org/" | |
| # Enable Corepack and use the correct Yarn version | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Use the correct Yarn version | |
| run: corepack prepare yarn@3.6.3 --activate | |
| # Load .env file if exists | |
| - name: Load .env file if exists | |
| run: | | |
| if [ -f .env ]; then | |
| set -a | |
| source .env | |
| set +a | |
| fi | |
| # Set Environment Variables with fallback to .env | |
| - name: Set Environment Variables with fallback to .env | |
| run: | | |
| echo "NPM_READ_TOKEN=${{ secrets.NPM_READ_TOKEN || env.NPM_READ_TOKEN }}" >> $GITHUB_ENV | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: yarn install | |
| # Run lint | |
| - name: Run lint | |
| run: yarn lint | |
| # Run tests with coverage | |
| - name: Run tests with coverage | |
| run: yarn test --coverage | |
| # Archive coverage reports (fixed version) | |
| - name: Archive coverage reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage |