-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (49 loc) · 1.59 KB
/
check-rust.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: Check Vortex backend
on:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Use Rust cache
uses: Swatinem/rust-cache@v2
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest,cargo-machete
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y perl
- name: Run cargo build
run: cargo build
- name: Run cargo nextest
run: cargo nextest run
- name: Run cargo machete
run: cargo machete
- name: Check formatting
run: cargo fmt --check
- name: Check clippy
run: cargo clippy --all-features -- -D warnings
- name: Run server and smtp-fuzz.pl in parallel
run: |
sudo VITE_SENTRY_DSN=${{ secrets.VITE_SENTRY_DSN }} VITE_EMAIL_DOMAINS=localhost FRONTEND_DOMAIN=localhost ./target/debug/vortex-server &
SERVER_PID=$!
echo "Server running in background with PID $SERVER_PID"
# Wait for port 25 to be open
while ! nc -z 127.0.0.1 25; do
echo "Waiting for port 25 to be open..."
sleep 1
done
echo "Port 25 is open"
perl Copyleft/smtp-fuzz.pl 127.0.0.1 25 &
FUZZ_PID=$!
echo "smtp-fuzz.pl running in background with PID $FUZZ_PID"
wait $FUZZ_PID
echo "smtp-fuzz.pl has finished"