Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit f3d1914

Browse files
authored
Merge pull request #55 from polyphony-chat/gateway
Gateway
2 parents 0938732 + c94d081 commit f3d1914

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+844
-257
lines changed

.github/workflows/build_and_test.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,42 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main", "dev" ]
7+
branches: ["main", "dev"]
88

99
env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
1313
linux:
14-
1514
runs-on: ubuntu-latest
16-
timeout-minutes: 30
17-
1815
steps:
16+
- uses: ikalnytskyi/action-setup-postgres@v6
17+
with:
18+
username: symfonia
19+
password: trans-actional-database-haha-get-it
20+
database: symfoniadb
21+
port: 5432
22+
id: postgres
1923
- name: Checkout code
2024
uses: actions/checkout@v4
25+
- uses: dtolnay/rust-toolchain@stable
2126
- uses: Swatinem/rust-cache@v2
2227
with:
2328
cache-all-crates: "true"
2429
prefix-key: "linux"
25-
- name: Build, Test and Publish Coverage
30+
- name: Build and Test with Nextest
31+
env:
32+
DATABASE_HOST: postgres
33+
DATABASE_USERNAME: symfonia
34+
DATABASE_PASSWORD: trans-actional-database-haha-get-it
35+
DATABASE_NAME: symfoniadb
36+
DATABASE_PORT: 5432
37+
SQLX_OFFLINE: true
38+
# This is only important for tests
39+
DATABASE_URL: ${{ steps.postgres.outputs.connection-uri }}
2640
run: |
27-
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
28-
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
29-
cargo binstall --no-confirm cargo-tarpaulin --force
30-
cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120
31-
else
32-
echo "Code Coverage step is skipped on forks!"
33-
cargo build --verbose --all-features
34-
cargo test --verbose --all-features
35-
fi
41+
curl -L --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
42+
cargo binstall cargo-nextest --secure --no-confirm --force
43+
cargo nextest run --all --verbose

.github/workflows/compose-smoketest.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: docker compose smoketest
22

33
on:
4-
push:
5-
branches: ["main"]
6-
pull_request:
7-
branches: ["main", "dev"]
4+
schedule:
5+
- cron: "0 12 1,10,20 * *"
86

97
jobs:
108
deploy_compose:
@@ -13,10 +11,6 @@ jobs:
1311
steps:
1412
- name: Checkout code
1513
uses: actions/checkout@v4
16-
- uses: Swatinem/rust-cache@v2
17-
with:
18-
cache-all-crates: "true"
19-
prefix-key: "ubuntu-latest"
2014
- name: Create .env file
2115
run: cp compose-example.env .env
2216
- name: Docker Compose Action

.github/workflows/rust-clippy.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ name: rust-clippy analyze
1111

1212
on:
1313
push:
14-
branches: [ "main", "preserve/*" ]
14+
branches: ["main", "preserve/*"]
1515
pull_request:
1616
# The branches below must be a subset of the branches above
17-
branches: [ "main", "dev" ]
17+
branches: ["main", "dev"]
1818

1919
jobs:
2020
rust-clippy-analyze:
@@ -33,12 +33,21 @@ jobs:
3333
with:
3434
components: clippy
3535

36-
- name: Install required cargo
37-
run: cargo install clippy-sarif sarif-fmt
36+
- name: cargo binstall
37+
run: curl -L --proto '=https' --tlsv1.3 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
38+
39+
- name: Install required utils
40+
run: |
41+
cargo binstall clippy-sarif --no-confirm --force
42+
cargo binstall sarif-fmt --no-confirm --force
43+
44+
- uses: Swatinem/rust-cache@v2
45+
with:
46+
cache-all-crates: "true"
47+
prefix-key: "v0a-rust-clippy"
3848

3949
- name: Run rust-clippy
40-
run:
41-
cargo clippy
50+
run: cargo clippy
4251
--all-features
4352
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
4453
continue-on-error: true

.sqlx/query-8d127613251411c2dae324bc92105869cd4456e849b3527c9bfbe342879d4418.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-90499a591252a71ff3ed78f2662c7897e45450634c4f2e1a7a4ece72e53f056c.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-93f9974c9aacce5d679f93ae721750630ecb9ba50f209b2818c38251720f397b.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ reqwest = { version = "0.12.5", default-features = false, features = [
4040
] }
4141
serde = { version = "1.0.203", features = ["derive"] }
4242
serde_json = { version = "1.0.117", features = ["raw_value"] }
43-
sqlx = { version = "0.8.1", features = [
43+
sqlx = { version = "0.8.2", features = [
4444
"json",
4545
"chrono",
4646
"ipnetwork",
@@ -71,7 +71,7 @@ tokio-tungstenite = { version = "0.23.1", features = [
7171
] }
7272
pubserve = { version = "1.1.0", features = ["async", "send"] }
7373
parking_lot = { version = "0.12.3", features = ["deadlock_detection"] }
74-
sqlx-pg-uint = { version = "0.7.1", features = ["serde"] }
74+
sqlx-pg-uint = { version = "0.7.2", features = ["serde"] }
7575

7676
[dev-dependencies]
7777
rusty-hook = "0.11.2"

firedbg/target-unit-test.json

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

firedbg/target.json

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

firedbg/version.toml

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)