-
Notifications
You must be signed in to change notification settings - Fork 540
105 lines (101 loc) · 3.38 KB
/
ui-ci.yml
File metadata and controls
105 lines (101 loc) · 3.38 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: UI CI
on:
workflow_dispatch:
pull_request:
paths:
- "quickwit/quickwit-ui/**"
- ".github/workflows/ui-ci.yml"
push:
branches:
- main
- trigger-ci-workflow
paths:
- "quickwit/quickwit-ui/**"
- ".github/workflows/ui-ci.yml"
permissions:
contents: read
jobs:
checks:
name: Lint, type check & unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "yarn"
cache-dependency-path: quickwit/quickwit-ui/yarn.lock
- name: Install JS dependencies
run: yarn --cwd quickwit-ui install
working-directory: ./quickwit
- name: Lint
run: yarn --cwd quickwit-ui lint
working-directory: ./quickwit
- name: Type check
run: yarn --cwd quickwit-ui type
working-directory: ./quickwit
- name: Unit tests
run: yarn --cwd quickwit-ui test
working-directory: ./quickwit
e2e:
name: Playwright e2e
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: quickwit-dev
POSTGRES_PASSWORD: quickwit-dev
POSTGRES_DB: quickwit-metastore-dev
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
RUSTFLAGS: -Dwarnings --cfg tokio_unstable
RUSTDOCFLAGS: -Dwarnings -Arustdoc::private_intra_doc_links
QW_TEST_DATABASE_URL: postgres://quickwit-dev:quickwit-dev@postgres:5432/quickwit-metastore-dev
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: "yarn"
cache-dependency-path: quickwit/quickwit-ui/yarn.lock
- name: Setup stable Rust Toolchain
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
with:
toolchain: stable
- name: Setup Rust cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
workspaces: "./quickwit -> target"
shared-key: "quickwit-cargo"
- name: Install JS dependencies
run: yarn --cwd quickwit-ui install
working-directory: ./quickwit
- name: Install Playwright browsers
run: npx playwright install chromium --with-deps --only-shell
working-directory: ./quickwit/quickwit-ui
- name: Build UI
run: CI=false yarn --cwd quickwit-ui build
working-directory: ./quickwit
- name: Build Quickwit
run: |
sudo apt-get update && sudo apt-get -y install protobuf-compiler
cargo build --features=postgres
working-directory: ./quickwit
- name: Run e2e tests
run: |
mkdir -p qwdata
cargo run --features=postgres -- run --service searcher --service metastore --config ../config/quickwit.yaml &
yarn --cwd quickwit-ui e2e-test
working-directory: ./quickwit