Add scritps folder
This commit is contained in:
parent
c49ee759ac
commit
993515ea12
6 changed files with 13 additions and 11 deletions
6
.github/workflows/e2e.yml
vendored
6
.github/workflows/e2e.yml
vendored
|
|
@ -32,7 +32,5 @@ jobs:
|
|||
- name: E2E tests
|
||||
run: |
|
||||
UST_BACKTRACE=1 cargo run -p sync_server &
|
||||
cd ../frontend
|
||||
|
||||
npm run build
|
||||
test-client/run.sh 32
|
||||
cd ..
|
||||
scripts/e2e.sh 32
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@
|
|||
## Set up Rust
|
||||
|
||||
- Install [`rustup`](https://rustup.rs): `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
|
||||
- `sudo apt install llvm -y`
|
||||
- `rustup component add llvm-tools-preview`
|
||||
- `cargo install cargo-generate cargo-fuzz cargo-insta rustfilt cargo-binutils`
|
||||
- Install [`wasm-pack`](https://rustwasm.github.io/wasm-pack/installer): `curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh`
|
||||
- `cargo install cargo-insta sqlx-cli cargo-edit`
|
||||
|
||||
|
|
@ -33,8 +30,7 @@
|
|||
## Update HTTP API TS bindings
|
||||
|
||||
```sh
|
||||
npm install -g openapi-typescript
|
||||
openapi-typescript http://localhost:3030/api.json --output frontend/sync-client/src/services/types.ts
|
||||
./update-api-types.sh
|
||||
```
|
||||
|
||||
```
|
||||
|
|
|
|||
2
clean-up.sh → scripts/clean-up.sh
Normal file → Executable file
2
clean-up.sh → scripts/clean-up.sh
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf backend/databases
|
||||
rm -rf frontend/test-client/logs
|
||||
|
|
@ -12,16 +12,19 @@ fi
|
|||
# Get the number of processes from the first argument
|
||||
process_count=$1
|
||||
|
||||
cd frontend
|
||||
npm run build
|
||||
|
||||
mkdir -p logs
|
||||
|
||||
pids=()
|
||||
for i in $(seq 1 $process_count); do
|
||||
node dist/cli.js > "logs/log_${i}.log" 2>&1 &
|
||||
node test-client/dist/cli.js > "logs/log_${i}.log" 2>&1 &
|
||||
pids+=($!)
|
||||
done
|
||||
|
||||
cd -
|
||||
|
||||
print_failed_log() {
|
||||
for i in $(seq 1 $process_count); do
|
||||
if [ -n "${pids[$i-1]}" ] && ! kill -0 ${pids[$i-1]} 2>/dev/null; then
|
||||
|
|
@ -73,3 +76,4 @@ while true; do
|
|||
|
||||
sleep 0.2
|
||||
done
|
||||
|
||||
4
scripts/update-api-types.sh
Executable file
4
scripts/update-api-types.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
npm install -g openapi-typescript
|
||||
openapi-typescript http://localhost:3030/api.json --output frontend/sync-client/src/services/types.ts
|
||||
Loading…
Add table
Add a link
Reference in a new issue