-
Notifications
You must be signed in to change notification settings - Fork 350
79 lines (77 loc) · 2.49 KB
/
ui-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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"
jobs:
tests:
name: ${{ matrix.task.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task:
- name: Cypress run
command: |
sudo apt-get -y install protobuf-compiler
rustup show
CI=false yarn --cwd quickwit-ui build
RUSTFLAGS="--cfg tokio_unstable" cargo build --features=postgres
mkdir qwdata
RUSTFLAGS="--cfg tokio_unstable" cargo run --features=postgres -- run --service searcher --service metastore --config ../config/quickwit.yaml &
yarn --cwd quickwit-ui cypress run
- name: Lint
command: yarn --cwd quickwit-ui lint
- name: Unit Test
command: yarn --cwd quickwit-ui test
services:
# PostgreSQL service container
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: quickwit-dev
POSTGRES_PASSWORD: quickwit-dev
POSTGRES_DB: quickwit-metastore-dev
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
RUSTFLAGS: -Dwarnings -C lto=off
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@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: quickwit/quickwit-ui/yarn.lock
- name: Install rustup
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
- name: Install JS dependencies
run: yarn --cwd quickwit-ui install
working-directory: ./quickwit
- name: Setup Rust cache
if: matrix.task.name == 'Cypress run'
uses: Swatinem/rust-cache@v2
with:
workspaces: "./quickwit -> target"
- name: ${{ matrix.task.name }}
run: ${{ matrix.task.command }}
working-directory: ./quickwit