Skip to content

Commit e3ae7be

Browse files
authored
Merge pull request #1 from supragya/0.2.0
version: 0.2.0
2 parents 6a8eeb5 + 9058d8c commit e3ae7be

39 files changed

+4358
-1205
lines changed

.github/workflows/lint-nightly.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow runs linting and formatting checks using Rust nightly.
2+
# It will:
3+
# - Install Rust nightly toolchain
4+
# - Check for unused dependencies using cargo-udeps
5+
# - Check code formatting using cargo +nightly fmt -- --check
6+
7+
name: Rust Nightly Lint & Format
8+
9+
on:
10+
push:
11+
branches: [ main ]
12+
pull_request:
13+
branches: [ main ]
14+
15+
jobs:
16+
lint-nightly:
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
# Checks out the source code
22+
23+
- name: Install Rust Nightly
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: nightly
27+
profile: minimal
28+
override: true
29+
# Installs the nightly Rust toolchain
30+
31+
- name: Install cargo-udeps
32+
run: cargo install cargo-udeps --locked
33+
# Installs the cargo-udeps tool for detecting unused dependencies
34+
35+
- name: Check for unused dependencies
36+
run: cargo +nightly udeps
37+
# Runs cargo-udeps to check for unused dependencies
38+
39+
- name: Check code formatting
40+
run: cargo +nightly fmt -- --check
41+
# Checks that code is properly formatted using nightly rustfmt
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This GitHub Actions workflow runs PostgreSQL integration tests for the orchestrator-rs project.
2+
# It is designed to run on Ubuntu 24.04 or later, and will:
3+
# - Checkout the repository
4+
# - Install Rust (stable toolchain)
5+
# - Install Docker (required for database tests)
6+
# - Run the Rust tests for the database::postgresql module in single-threaded mode
7+
#
8+
# Usage:
9+
# - Triggered on push or pull request to the main branch
10+
# - The RUST_LOG=debug environment variable is set for verbose test output
11+
# - Only tests matching the filter `database::postgresql` are run, with `--test-threads=1` to avoid migration race conditions
12+
13+
name: PostgreSQL Integration Tests
14+
15+
on:
16+
push:
17+
branches: [ main ]
18+
pull_request:
19+
branches: [ main ]
20+
21+
jobs:
22+
test-postgresql:
23+
runs-on: ubuntu-24.04
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
# Checks out the source code so it can be built and tested
28+
29+
- name: Install Rust Nightly
30+
uses: actions-rs/toolchain@v1
31+
with:
32+
toolchain: nightly
33+
profile: minimal
34+
override: true
35+
# Installs the nightly Rust toolchain for building and testing
36+
37+
- name: Remove conflicting container packages
38+
run: |
39+
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove -y $pkg; done
40+
# Removes any potentially conflicting container packages before installing Docker
41+
42+
- name: Install Docker (official method)
43+
run: |
44+
sudo apt-get update
45+
sudo apt-get install -y ca-certificates curl
46+
sudo install -m 0755 -d /etc/apt/keyrings
47+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
48+
sudo chmod a+r /etc/apt/keyrings/docker.asc
49+
echo \
50+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
51+
$(. /etc/os-release && echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable" | \
52+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
53+
sudo apt-get update
54+
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
55+
# Installs Docker using the official apt repository and recommended packages
56+
57+
- name: Run PostgreSQL integration tests
58+
env:
59+
RUST_LOG: debug
60+
run: |
61+
cargo test database::postgresql -- --test-threads=1
62+
# Runs only the database::postgresql tests in single-threaded mode for reliability

0 commit comments

Comments
 (0)