Skip to content

Commit b6bcee2

Browse files
committed
chore: update CI configuration to use Node 24, skip e2e tests and activate unit tests
1 parent b163cec commit b6bcee2

1 file changed

Lines changed: 86 additions & 55 deletions

File tree

.github/workflows/ci.yml

Lines changed: 86 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ jobs:
2626

2727
- name: Install pnpm
2828
uses: pnpm/action-setup@v4
29+
with:
30+
version: 10.10.0
2931

3032
- name: Setup Node
3133
uses: actions/setup-node@v4
3234
with:
33-
node-version: 22
35+
node-version: 24
3436
cache: 'pnpm'
3537

3638
- name: Install dependencies
@@ -39,33 +41,8 @@ jobs:
3941
- name: Run linting
4042
run: pnpm --stream -r lint
4143

42-
# +++ COMMENTED OUT BECAUSE THIS IS A SEPARATE ISSUE: https://github.com/Frachtwerk/essencium-frontend/issues/221 +++
43-
# unit-tests:
44-
# name: Unit Tests
45-
# runs-on: ubuntu-latest
46-
# steps:
47-
# - name: Checkout repo
48-
# uses: actions/checkout@v4
49-
# with:
50-
# fetch-depth: 0
51-
52-
# - name: Install pnpm
53-
# uses: pnpm/action-setup@v4
54-
55-
# - name: Setup Node
56-
# uses: actions/setup-node@v4
57-
# with:
58-
# node-version: 22
59-
# cache: 'pnpm'
60-
61-
# - name: Install dependencies
62-
# run: pnpm install --frozen-lockfile
63-
64-
# - name: Run unit tests
65-
# run: pnpm --stream -r test:unit
66-
67-
e2e-tests:
68-
name: E2E Tests
44+
unit-tests:
45+
name: Unit Tests
6946
runs-on: ubuntu-latest
7047
steps:
7148
- name: Checkout repo
@@ -75,43 +52,93 @@ jobs:
7552

7653
- name: Install pnpm
7754
uses: pnpm/action-setup@v4
55+
with:
56+
version: 10.10.0
7857

7958
- name: Setup Node
8059
uses: actions/setup-node@v4
8160
with:
82-
node-version: 22
61+
node-version: 24
8362
cache: 'pnpm'
8463

8564
- name: Install dependencies
8665
run: pnpm install --frozen-lockfile
8766

88-
- name: Get installed Playwright version
89-
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./packages/app/package.json').dependencies['@playwright/test'])")" >> $GITHUB_ENV
67+
- name: Run unit tests
68+
run: pnpm --stream -r test:unit
9069

91-
- name: Install Playwright browsers
92-
run: pnpm --filter @frachtwerk/essencium-app exec playwright install --with-deps
70+
# e2e-tests:
71+
# name: E2E Tests
72+
# continue-on-error: true
73+
# if: github.event_name != 'pull_request'
74+
# runs-on: ubuntu-latest
75+
# steps:
76+
# - name: Checkout repo
77+
# uses: actions/checkout@v4
78+
# with:
79+
# fetch-depth: 0
9380

94-
- name: Cache Playwright
95-
uses: actions/cache@v4
96-
id: playwright-cache
97-
with:
98-
path: ~/.cache/ms-playwright
99-
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
81+
# - name: Install pnpm
82+
# uses: pnpm/action-setup@v4
83+
# with:
84+
# version: 10.10.0
10085

101-
- name: Run E2E tests
102-
run: pnpm test:e2e
103-
env:
104-
TEST_ADMIN_USERNAME: ${{ secrets.TEST_ADMIN_USERNAME }}
105-
TEST_ADMIN_PASSWORD: ${{ secrets.TEST_ADMIN_PASSWORD }}
86+
# - name: Setup Node
87+
# uses: actions/setup-node@v4
88+
# with:
89+
# node-version: 24
90+
# cache: 'pnpm'
10691

107-
- name: Upload E2E test results
108-
uses: actions/upload-artifact@v4
109-
if: always()
110-
with:
111-
name: e2e-test-results
112-
path: |
113-
packages/app/test-results
114-
packages/app/playwright-report
92+
# - name: Install dependencies
93+
# run: pnpm install --frozen-lockfile
94+
95+
# - name: Get installed Playwright version
96+
# run: |
97+
# PLAYWRIGHT_VERSION=$(node -p "require('./packages/app/package.json').devDependencies['@playwright/test']")
98+
# echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> "$GITHUB_ENV"
99+
100+
# - name: Cache Playwright
101+
# uses: actions/cache@v4
102+
# id: playwright-cache
103+
# with:
104+
# path: ~/.cache/ms-playwright
105+
# key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
106+
107+
# - name: Start local backend
108+
# run: docker compose -f backend.docker-compose.yml up -d db backend
109+
110+
# - name: Wait for backend health
111+
# run: |
112+
# for i in {1..60}; do
113+
# if curl -fsS http://localhost:8098 >/dev/null; then
114+
# exit 0
115+
# fi
116+
# sleep 3
117+
# done
118+
# docker compose -f backend.docker-compose.yml logs db backend
119+
# exit 1
120+
121+
# - name: Install Playwright browsers
122+
# run: pnpm --filter @frachtwerk/essencium-app exec playwright install --with-deps
123+
124+
# - name: Run E2E tests
125+
# run: pnpm --filter @frachtwerk/essencium-app test:e2e:test
126+
# env:
127+
# TEST_ADMIN_USERNAME: ${{ secrets.TEST_ADMIN_USERNAME }}
128+
# TEST_ADMIN_PASSWORD: ${{ secrets.TEST_ADMIN_PASSWORD }}
129+
130+
# - name: Stop local backend
131+
# if: always()
132+
# run: docker compose -f backend.docker-compose.yml down -v
133+
134+
# - name: Upload E2E test results
135+
# uses: actions/upload-artifact@v4
136+
# if: always()
137+
# with:
138+
# name: e2e-test-results
139+
# path: |
140+
# packages/app/test-results
141+
# packages/app/playwright-report
115142

116143
build:
117144
name: Build
@@ -124,11 +151,13 @@ jobs:
124151

125152
- name: Install pnpm
126153
uses: pnpm/action-setup@v4
154+
with:
155+
version: 10.10.0
127156

128157
- name: Setup Node
129158
uses: actions/setup-node@v4
130159
with:
131-
node-version: 20
160+
node-version: 24
132161
cache: 'pnpm'
133162

134163
- name: Install dependencies
@@ -202,7 +231,7 @@ jobs:
202231
permissions:
203232
contents: write
204233
pull-requests: write
205-
needs: [lint, build] # [lint, unit-tests, e2e-tests, build]
234+
needs: [lint, unit-tests, build]
206235
steps:
207236
- name: Release Please
208237
uses: googleapis/release-please-action@v4
@@ -219,11 +248,13 @@ jobs:
219248

220249
- name: Install pnpm
221250
uses: pnpm/action-setup@v4
251+
with:
252+
version: 10.10.0
222253

223254
- name: Setup Node
224255
uses: actions/setup-node@v4
225256
with:
226-
node-version: 22
257+
node-version: 24
227258
cache: 'pnpm'
228259
registry-url: 'https://registry.npmjs.org'
229260

0 commit comments

Comments
 (0)