forked from PrismarineJS/prismarine-web-client
-
Notifications
You must be signed in to change notification settings - Fork 63
64 lines (61 loc) · 1.81 KB
/
ci.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
pull_request:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 17
java-package: jre
- name: Install pnpm
run: npm i -g [email protected]
- uses: actions/setup-node@v4
with:
node-version: 18
# cache: "pnpm"
- run: pnpm install
- run: pnpm check-build
- run: pnpm build-playground
- run: pnpm build-storybook
- run: pnpm test-unit
- run: pnpm lint
- run: pnpm tsx scripts/buildNpmReact.ts
- run: nohup pnpm prod-start &
- run: nohup pnpm test-mc-server &
- uses: cypress-io/github-action@v5
with:
install: false
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-images
path: cypress/screenshots/
# - run: node scripts/outdatedGitPackages.mjs
# if: ${{ github.event.pull_request.base.ref == 'release' }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dedupe-check:
runs-on: ubuntu-latest
if: github.event.pull_request.head.ref == 'next'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install pnpm
run: npm install -g [email protected]
- name: Run pnpm dedupe
run: pnpm dedupe
- name: Check for changes
run: |
if ! git diff --exit-code --quiet pnpm-lock.yaml; then
echo "pnpm dedupe introduced changes:"
git diff --color=always pnpm-lock.yaml
exit 1
else
echo "No changes detected after pnpm dedupe in pnpm-lock.yaml"
fi