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
# This is a GitHub Actions workflow file.
# It defines a set of automated jobs to run in response to events in your repository.
# For more information, see: https://docs.github.com/en/actions
name: Rust and Python WebSocket Integration Test
on:
# Triggers the workflow on push or pull request events for the "main" branch,
# but only when files in the specified paths have been modified.
push:
# branches: [main]
paths:
- "src/**"
- "experiments/simd-r-drive-ws-server/**"
- "experiments/bindings/python-ws-client/**"
- ".github/workflows/integration-test.yml"
pull_request:
# branches: [main]
paths:
- "src/**"
- "experiments/simd-r-drive-ws-server/**"
- "experiments/bindings/python-ws-client/**"
- ".github/workflows/integration-test.yml"
jobs:
# The "test" job defines a sequence of steps to be executed
test:
# The type of runner that the job will run on. This creates a build matrix.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
steps:
# Step 1: Check out the repository code
# This action checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up the Rust toolchain
# This action installs a specific version of the Rust toolchain.
- name: Set up Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
# Step 3: Set up Python
# This action sets up a Python environment for use in actions.
- name: Set up Python
uses: actions/setup-python@v5
with:
# Use a Python version compatible with your project
python-version: "3.12"
# Step 4: Install the 'uv' package manager
# 'uv' is used for fast Python package management in the test script.
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash
# Step 5: Run the integration test script
# This step makes the script executable and then runs it.
# The script handles starting the server, running tests, and cleanup.
# We specify 'bash' as the shell to ensure compatibility on Windows.
- name: Run Integration Test Script
run: |
chmod +x experiments/bindings/python-ws-client/integration_test.sh
./experiments/bindings/python-ws-client/integration_test.sh
shell: bash