build(deps-dev): bump express from 4.19.2 to 4.21.1 in /test-suite #300
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: ["master"] | |
tags: ["v*.*.*"] | |
pull_request: | |
branches: ["master"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Run tests | |
run: cargo test --workspace | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Enforce formatting | |
run: cargo +nightly fmt --all --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Linting | |
run: cargo clippy --workspace -- -D warnings | |
compat-test: | |
name: Compatibility test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- run: cargo build | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: test-suite/package-lock.json | |
- name: Run compatibility test suite | |
run: npm ci && npm run test:rust-emulator -- --maxConcurrency=3 | |
working-directory: test-suite | |
deploy: | |
name: Deploy | |
needs: | |
- test | |
- fmt | |
- clippy | |
- compat-test | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Build | |
run: cargo build --release --no-default-features | |
- name: Package | |
shell: bash | |
run: | | |
cd target/release | |
tar czvf ../../firestore-emulator.tar.gz firestore-emulator | |
cd - | |
- name: Publish | |
# More info at: https://github.com/softprops/action-gh-release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# Will be accessible at: | |
# - https://github.com/skunkteam/rust-firestore-emulator/releases/latest/download/firestore-emulator.tar.gz | |
# - https://github.com/skunkteam/rust-firestore-emulator/releases/download/<tag>/firestore-emulator.tar.gz | |
files: firestore-emulator.tar.gz | |
deploy-arm64: | |
name: Deploy ARM64 | |
needs: | |
- test | |
- fmt | |
- clippy | |
- compat-test | |
runs-on: ubuntu-24.04-arm-4core | |
if: startsWith(github.ref, 'refs/tags/v') | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Build | |
run: cargo build --release --no-default-features | |
- name: Package | |
shell: bash | |
run: | | |
cd target/release | |
tar czvf ../../firestore-emulator-arm64.tar.gz firestore-emulator | |
cd - | |
- name: Publish | |
# More info at: https://github.com/softprops/action-gh-release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# Will be accessible at: | |
# - https://github.com/skunkteam/rust-firestore-emulator/releases/latest/download/firestore-emulator-arm64.tar.gz | |
# - https://github.com/skunkteam/rust-firestore-emulator/releases/download/<tag>/firestore-emulator-arm64.tar.gz | |
files: firestore-emulator-arm64.tar.gz | |
# coverage: | |
# name: Code coverage | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: "true" | |
# - uses: dtolnay/rust-toolchain@stable | |
# - uses: Swatinem/rust-cache@v2 | |
# - name: Install Protoc | |
# uses: arduino/setup-protoc@v3 | |
# - name: Install tarpaulin | |
# run: cargo install cargo-tarpaulin | |
# - name: Generate code coverage | |
# run: cargo tarpaulin --workspace --color always |