-
-
Notifications
You must be signed in to change notification settings - Fork 44
37 lines (32 loc) · 1.01 KB
/
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
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose --all-targets
- name: Run tests
run: cargo test --verbose
- name: Run integration test (smtp)
if: matrix.os == 'ubuntu-latest'
run: |
docker build -t authoscope-smtpd ci/smtp/
docker run --name authoscope-smtpd -d --rm -p 127.0.0.1:25:25 authoscope-smtpd
echo [email protected]:foo > /tmp/authoscope-smtp-input.txt
target/debug/authoscope -o authoscope-smtp-output.txt combo /tmp/authoscope-smtp-input.txt scripts/smtp.lua
docker stop authoscope-smtpd
- name: Verify integration test (smtp)
if: matrix.os == 'ubuntu-latest'
run: grep -q [email protected] authoscope-smtp-output.txt