Skip to content

Commit 7a24b63

Browse files
committed
build: update GH actions for more speed
1 parent 8a45fbd commit 7a24b63

File tree

2 files changed

+16
-38
lines changed

2 files changed

+16
-38
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
- main
66
pull_request:
77
types: [opened, synchronize, reopened, edited]
8-
8+
env:
9+
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
910
jobs:
1011
build:
1112
name: Build
@@ -42,12 +43,18 @@ jobs:
4243
- name: Install Dependencies
4344
run: pnpm install
4445

45-
- name: Lint packages
46-
run: pnpm run lint
47-
4846
- name: Build packages
4947
run: pnpm run build
5048

49+
test:
50+
name: "Test"
51+
runs-on: ubuntu-latest
52+
needs: build
53+
timeout-minutes: 60
54+
steps:
55+
- name: Lint packages
56+
run: pnpm run lint
57+
5158
- name: Run unit tests
5259
run: pnpm run test
5360

@@ -64,6 +71,7 @@ jobs:
6471
playwright:
6572
name: "Playwright Tests - ${{ matrix.browser }}"
6673
runs-on: ubuntu-latest
74+
needs: build
6775
timeout-minutes: 60
6876
container:
6977
image: mcr.microsoft.com/playwright:v1.51.1-noble
@@ -72,39 +80,6 @@ jobs:
7280
matrix:
7381
browser: [chromium, firefox, webkit]
7482
steps:
75-
- uses: actions/checkout@v4
76-
with:
77-
fetch-depth: 100
78-
79-
- name: Install pnpm
80-
uses: pnpm/action-setup@v4
81-
82-
- uses: nrwl/nx-set-shas@v3
83-
84-
- uses: actions/setup-node@v4
85-
with:
86-
cache: "pnpm"
87-
cache-dependency-path: "**/pnpm-lock.yaml"
88-
node-version-file: ".nvmrc"
89-
90-
- name: Cache NX
91-
uses: actions/cache@v4
92-
with:
93-
path: .nx/cache
94-
key: nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
95-
restore-keys: |
96-
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
97-
nx-${{ env.NX_BRANCH }}-
98-
nx-
99-
100-
- run: apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
101-
102-
- name: Install dependencies
103-
run: pnpm install
104-
105-
- name: Build packages
106-
run: pnpm run build
107-
10883
- name: Run server and Playwright tests
10984
run: |
11085
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }}" pnpm run e2e

.github/workflows/publish.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ on:
66
tags:
77
- v*.*.*
88

9+
env:
10+
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
11+
912
jobs:
10-
test:
13+
publish:
1114
name: Publish
1215
runs-on: ubuntu-latest
1316
permissions:

0 commit comments

Comments
 (0)