Refactored pagination component #473
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: 'Stencil Unit Tests' | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [main, development] | |
| paths: | |
| - 'src/**' | |
| - '**.js' | |
| - '**.ts' | |
| - '**.json' | |
| repository_dispatch: | |
| types: run-unit-tests | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-unit-tests: | |
| runs-on: ubuntu-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| steps: | |
| - name: Fix permissions | |
| run: | | |
| sudo chown -R $USER:$USER ${{ github.workspace }} | |
| sudo chmod -R 755 ${{ github.workspace }} | |
| continue-on-error: true | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| clean: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup pnpm | |
| run: npm install -g pnpm | |
| - name: Remove node_modules | |
| run: rm -rf node_modules | |
| - name: Install Chrome for Puppeteer | |
| run: | | |
| wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install -y google-chrome-stable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Run unit tests | |
| run: pnpm test | |
| env: | |
| PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable |