Skip to content

Commit

Permalink
Merge pull request #82 from Totodore/chore-cargo-cache-ci
Browse files Browse the repository at this point in the history
chore(ci): add release/test flag to key to separate caches
  • Loading branch information
Totodore authored Sep 19, 2023
2 parents adf9111 + 0b90d7b commit 6322756
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 53 deletions.
51 changes: 3 additions & 48 deletions .github/workflows/engineio-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-release
- name: Install deps & run tests
run: |
cd engine.io-protocol/test-suite && npm install && cd ../..
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-release
- name: Install deps & run tests
run: |
cd engine.io-protocol/test-suite && npm install && cd ../..
Expand All @@ -81,49 +81,4 @@ jobs:
run: cat server.txt
- name: Client output
if: always()
run: cat client.txt
e2e_full:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v3
with:
repository: socketio/engine.io-protocol
path: engine.io-protocol-v3
ref: v3
- uses: actions/checkout@v3
with:
repository: socketio/engine.io-protocol
path: engine.io-protocol-v4
ref: main
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install deps & run tests
run: |
cd engine.io-protocol-v3/test-suite && npm install && cd ../..
cd engine.io-protocol-v4/test-suite && npm install && cd ../..
cargo build --bin engineioxide-e2e --release --features engineio-v3,engineio-v4 --no-default-features
cargo run --bin engineioxide-e2e --release --features engineio-v3,engineio-v4 --no-default-features > server.txt & npm --prefix engine.io-protocol-v4/test-suite test > client_v4.txt & npm --prefix engine.io-protocol-v3/test-suite test > client_v3.txt
- name: Server output
if: always()
run: cat server.txt
- name: Client v3 output
if: always()
run: cat client_v3.txt
- name: Client v4 output
if: always()
run: cat client_v4.txt
run: cat client.txt
6 changes: 3 additions & 3 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-clippy

- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
run: cargo install clippy-sarif sarif-fmt || true

- name: Run rust-clippy
run:
Expand All @@ -56,7 +56,7 @@ jobs:
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
4 changes: 2 additions & 2 deletions .github/workflows/socketio-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-test
- run: cargo test --all-features
e2e:
runs-on: ubuntu-latest
Expand All @@ -60,7 +60,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-release
- name: Install deps & run tests
run: |
cd socket.io-protocol/test-suite && npm install && cd ../..
Expand Down

0 comments on commit 6322756

Please sign in to comment.