Skip to content

Commit b5dca07

Browse files
authored
Merge pull request #24 from AvivNaaman/5-system-tests-setup
#5 Add support for integration tests during CI.
2 parents acc287a + 748b675 commit b5dca07

33 files changed

+550
-220
lines changed

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
# manual:
9+
workflow_dispatch:
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
test:
16+
17+
runs-on: ubuntu-latest
18+
container:
19+
image: rust:latest
20+
timeout-minutes: 5
21+
strategy:
22+
matrix:
23+
compile_features: [ async, multi_threaded, single_threaded ]
24+
25+
services:
26+
samba:
27+
image: ghcr.io/avivnaaman/smb-tests:latest
28+
ports:
29+
- 445:445
30+
env:
31+
ACCOUNT_LocalAdmin: 123456
32+
SAMBA_CONF_LOG_LEVEL: 1
33+
SAMBA_VOLUME_CONFIG_MyShare: "[MyShare]; path=/shares/MyShare; read only = no; browseable = yes"
34+
credentials:
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.ACCESS_TOKEN }}
37+
options: --name samba --privileged --cap-add NET_ADMIN
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Build/${{ matrix.compile_features }}
42+
run: cargo build --verbose --no-default-features --features "${{ matrix.compile_features }},sign,encrypt,compress"
43+
- name: Tests/${{ matrix.compile_features }}
44+
run: |
45+
export SMB_RUST_TESTS_SERVER=samba:445
46+
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},sign,encrypt,compress" -- --nocapture

.github/workflows/rust.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/target
22
.DS_Store
3-
.vscode
3+
.vscode
4+
*.pcap

0 commit comments

Comments
 (0)