|
5 | 5 | pull_request: |
6 | 6 | branches: [main] |
7 | 7 | jobs: |
8 | | - test: |
9 | | - timeout-minutes: 60 |
| 8 | + lint: |
| 9 | + timeout-minutes: 10 |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | 12 | - uses: actions/checkout@v4 |
13 | 13 | - uses: actions/setup-node@v4 |
14 | 14 | with: |
15 | 15 | node-version: 22 |
| 16 | + - uses: pnpm/action-setup@v4 |
| 17 | + with: |
| 18 | + version: 10 |
| 19 | + - name: Get pnpm store directory |
| 20 | + shell: bash |
| 21 | + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
| 22 | + - uses: actions/cache@v4 |
| 23 | + name: Setup pnpm cache |
| 24 | + with: |
| 25 | + path: ${{ env.STORE_PATH }} |
| 26 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 27 | + restore-keys: | |
| 28 | + ${{ runner.os }}-pnpm-store- |
16 | 29 | - name: Install dependencies |
17 | | - run: npm install -g pnpm && pnpm install |
| 30 | + run: pnpm install |
18 | 31 | - name: Run linting |
19 | 32 | run: pnpm lint |
| 33 | + |
| 34 | + unit: |
| 35 | + timeout-minutes: 10 |
| 36 | + runs-on: ubuntu-latest |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + - uses: actions/setup-node@v4 |
| 40 | + with: |
| 41 | + node-version: 22 |
| 42 | + - uses: pnpm/action-setup@v4 |
| 43 | + with: |
| 44 | + version: 10 |
| 45 | + - name: Get pnpm store directory |
| 46 | + shell: bash |
| 47 | + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
| 48 | + - uses: actions/cache@v4 |
| 49 | + name: Setup pnpm cache |
| 50 | + with: |
| 51 | + path: ${{ env.STORE_PATH }} |
| 52 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 53 | + restore-keys: | |
| 54 | + ${{ runner.os }}-pnpm-store- |
| 55 | + - name: Install dependencies |
| 56 | + run: pnpm install |
20 | 57 | - name: Run unit tests |
21 | 58 | run: pnpm test:unit run |
| 59 | + |
| 60 | + e2e: |
| 61 | + timeout-minutes: 60 |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + - uses: actions/setup-node@v4 |
| 66 | + with: |
| 67 | + node-version: 22 |
| 68 | + - uses: pnpm/action-setup@v4 |
| 69 | + with: |
| 70 | + version: 10 |
| 71 | + - name: Get pnpm store directory |
| 72 | + shell: bash |
| 73 | + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
| 74 | + - uses: actions/cache@v4 |
| 75 | + name: Setup pnpm cache |
| 76 | + with: |
| 77 | + path: ${{ env.STORE_PATH }} |
| 78 | + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
| 79 | + restore-keys: | |
| 80 | + ${{ runner.os }}-pnpm-store- |
| 81 | + - name: Install dependencies |
| 82 | + run: pnpm install |
22 | 83 | - name: Install Playwright Browsers |
23 | 84 | run: pnpm exec playwright install --with-deps |
24 | 85 | - name: Run Playwright tests |
|
0 commit comments