Skip to content

Commit

Permalink
chore(ci): Fix ci (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Totodore authored Jan 25, 2024
1 parent 82b4394 commit 908e1a0
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 58 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Install cargo-udeps
uses: taiki-e/install-action@cargo-udeps
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -59,10 +59,10 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-nightly
- name: Check unused dependencies on default features
run: cargo udeps
run: cargo udeps --workspace

- name: Check unused dependencies on all features
run: cargo udeps --all-features
run: cargo udeps --all-features --workspace

msrv:
runs-on: ubuntu-latest
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Get MSRV from package metadata
id: msrv
run: grep rust-version Cargo.toml | cut -d'"' -f2 | sed 's/^/version=/' >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -86,7 +86,7 @@ jobs:
components: rustfmt, clippy

- name: check crates
run: cargo check -p socketioxide -p engineioxide -p socketioxide-e2e -p engineioxide-e2e --all-features
run: cargo check -p socketioxide -p engineioxide --all-features

feature_set:
runs-on: ubuntu-latest
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Install cargo-hack
run: cargo install cargo-hack

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -120,7 +120,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -146,7 +146,7 @@ jobs:
with:
toolchain: stable
components: clippy
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -167,7 +167,7 @@ jobs:
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
Expand All @@ -188,11 +188,11 @@ jobs:
repository: totodore/engine.io-protocol
path: engine.io-protocol
ref: ${{ matrix.engineio-version }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -204,8 +204,8 @@ jobs:
- name: Install deps & run tests
run: |
cd engine.io-protocol/test-suite && npm install && cd ../..
cargo build --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release
cargo run --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release > server.txt & npm --prefix engine.io-protocol/test-suite test > client.txt
cargo build -p engineioxide-e2e --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release
cargo run -p engineioxide-e2e --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release > server.txt & npm --prefix engine.io-protocol/test-suite test > client.txt
- name: Server output
if: always()
run: cat server.txt
Expand All @@ -229,10 +229,10 @@ jobs:
repository: totodore/socket.io-protocol
ref: ${{ matrix.socketio-version }}
path: socket.io-protocol
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -244,8 +244,8 @@ jobs:
- name: Install deps & run tests
run: |
cd socket.io-protocol/test-suite && npm install && cd ../..
cargo build --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release
cargo run --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release > server.txt & npm --prefix socket.io-protocol/test-suite test > client.txt
cargo build -p socketioxide-e2e --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release
cargo run -p socketioxide-e2e --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release > server.txt & npm --prefix socket.io-protocol/test-suite test > client.txt
- name: Server output
if: always()
run: cat server.txt
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ jobs:

- name: Get releasing version
working-directory: .
run: echo NEXT_VERSION=$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
run:
NEXT_VERSION=$(sed -nE 's/^\s*version = "(.*?)"/\1/p' Cargo.toml) >> $GITHUB_ENV
echo NEXT_VERSION=$NEXT_VERSION >> $GITHUB_ENV
echo $NEXT_VERSION

- name: Check published version
run: echo PREV_VERSION=$(cargo search salvo --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -) >> $GITHUB_ENV
run:
PREV_VERSION=$(cargo search socketioxide --limit 1 | sed -nE 's/^[^"]*"//; s/".*//1p' -)
echo PREV_VERSION=$PREV_VERSION >> $GITHUB_ENV
echo $PREV_VERSION

- name: Cancel run
if: env.NEXT_VERSION == env.PREV_VERSION
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
Cargo.lock
.env
.vscode
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions examples/angular-todomvc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "angular-todomvc"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"


[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions examples/axum-echo-tls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "axum-echo-tls"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

[dependencies]
socketioxide = { path = "../../socketioxide" }
Expand Down
4 changes: 2 additions & 2 deletions examples/axum-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "axum-echo"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

[dependencies]
socketioxide = { path = "../../socketioxide" }
Expand Down
4 changes: 2 additions & 2 deletions examples/background-task/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "background-task"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions examples/basic-crud-application/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "basic-crud-application"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"


[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions examples/chat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "socketio-chat"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions examples/hyper-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "hyper-echo"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
13 changes: 6 additions & 7 deletions examples/loco-rooms-chat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
name = "loco_chat_rooms"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
rust-version = "1.70" # required by loco

[dependencies]

loco-rs = { version = "0.2.3", default-features = false, features = [
"cli",
"channels",
] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
eyre = "0.6.11"
tokio = { workspace = true, default-features = false }
async-trait = "0.1.74"
chrono = { version = "0.4", features = ["serde"] }

axum = { workspace = true }
tracing = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
tokio.workspace = true
axum.workspace = true
tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }

[[bin]]
Expand Down
4 changes: 2 additions & 2 deletions examples/private-messaging/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "private-messaging"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"


[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions examples/salvo-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "salvo-echo"
version.workspace = true
edition.workspace = true
rust-version = "1.67" # required by salvo
version = "0.1.0"
edition = "2021"
rust-version = "1.67" # required by salvo

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions examples/viz-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "viz-echo"
version.workspace = true
edition.workspace = true
version = "0.1.0"
edition = "2021"

[dependencies]
viz = "0.8.0"
Expand Down
5 changes: 2 additions & 3 deletions examples/whiteboard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[package]
name = "whiteboard"
version.workspace = true
edition.workspace = true

version = "0.1.0"
edition = "2021"

[dependencies]
socketioxide = { path = "../../socketioxide" }
Expand Down

0 comments on commit 908e1a0

Please sign in to comment.