-
Notifications
You must be signed in to change notification settings - Fork 73
44 lines (42 loc) · 1.12 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches: [v2]
jobs:
nodejs:
runs-on: ubuntu-latest
steps:
- uses: textbook/take-action@nodejs
with:
node-version: 20
- run: npx playwright install --with-deps
- run: npm run lint
- run: npm run test:cover
- run: npm run e2e
docker:
runs-on: ubuntu-latest
steps:
- uses: textbook/take-action@nodejs
with:
node-version: 20
- run: npx playwright install --with-deps
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
load: true
push: false
tags: textbook/starter-kit:v2
- id: docker-run
run: |
echo "id=$(docker run \
--detach \
--env LOG_LEVEL=debug \
--env NODE_ENV=docker \
--init \
--publish 4321:80 \
textbook/starter-kit:v2)" >> $GITHUB_OUTPUT
- run: npm run e2e
env:
PLAYWRIGHT_BASE_URL: http://localhost:4321
- if: always() && steps.docker-run.outputs.id
run: docker logs ${{ steps.docker-run.outputs.id }}