-
Notifications
You must be signed in to change notification settings - Fork 708
63 lines (47 loc) · 1.66 KB
/
cli-test.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
name: Cli tests
on:
push:
branches:
- main
pull_request:
# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: cli-${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
checks:
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
DATABASE_URL: postgres://
AUTH_SECRET: test
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
- uses: ./.github/actions/ci-setup
- name: Build cli and other fixtures dependencies
run: pnpm --filter='{./fixtures/*}^...' build
# Testing fixtures for vercel template
- name: Test cli --help flag
working-directory: ./fixtures/webstudio-remix-vercel
run: pnpm webstudio --help
- name: Testing cli link command
run: pnpm --filter='./fixtures/*' --sequential run fixtures:link
- name: Testing cli sync command
run: pnpm --filter='./fixtures/*' run --parallel fixtures:sync
- name: Testing cli build command
run: pnpm --filter='./fixtures/*' run --parallel fixtures:build
- name: Test git diff
# This command will fail if there are uncommitted changes, i.e something has broken
run: git diff --name-only HEAD --exit-code
- name: Show changed files
if: ${{ failure() }}
run: |
echo "Changed files are:"
git diff --name-only HEAD