Align MediaCore publisher lifecycle with slskdN #861
This file contains hidden or 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: CI | |
| env: | |
| ACTIONLINT_VERSION: v1.7.12 | |
| CARGO_AUDIT_VERSION: 0.22.1 | |
| SLSKR_SECURITY_SCANS_REQUIRED: '1' | |
| SLSKR_SEMGREP_IMAGE: semgrep/semgrep:1.167.0 | |
| SLSKR_TRIVY_IMAGE: aquasec/trivy:0.72.0 | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # Swatinem/rust-cache@v2 | |
| - name: Prefer rustup toolchain binaries | |
| run: dirname "$(rustup which cargo)" >> "$GITHUB_PATH" | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: | | |
| web/package-lock.json | |
| dashboard/package-lock.json | |
| client-ts/package-lock.json | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # actions/[email protected] | |
| with: | |
| go-version: '1.25.x' | |
| cache-dependency-path: client-go/go.sum | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # actions/[email protected] | |
| with: | |
| python-version: '3.12' | |
| - name: Install workflow and shell linters | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ripgrep shellcheck | |
| go install "github.com/rhysd/actionlint/cmd/actionlint@${ACTIONLINT_VERSION}" | |
| echo "$HOME/go/bin" >> "$GITHUB_PATH" | |
| - name: Restore cargo-audit | |
| id: cargo-audit-cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # actions/[email protected] | |
| with: | |
| path: ~/.cargo/bin/cargo-audit | |
| key: cargo-audit-${{ runner.os }}-${{ runner.arch }}-${{ env.CARGO_AUDIT_VERSION }} | |
| - name: Install cargo-audit | |
| if: steps.cargo-audit-cache.outputs.cache-hit != 'true' | |
| run: '"$(rustup which cargo)" install cargo-audit --version "$CARGO_AUDIT_VERSION" --locked' | |
| - run: scripts/check-public-posture.sh | |
| - run: cargo fmt --all --check | |
| - run: cargo clippy --workspace --all-targets -- -D warnings | |
| - run: cargo check -p slskr-web --target wasm32-unknown-unknown | |
| - run: cargo test --workspace | |
| - run: cargo audit | |
| - run: scripts/run-security-scans.sh | |
| - run: scripts/check-client-sdk-gates.sh | |
| - run: npm --prefix web ci --allow-git=root --legacy-peer-deps | |
| - run: bash scripts/check-web-audit.sh | |
| - run: npm --prefix web run lint | |
| - run: npm --prefix web test | |
| - run: npm --prefix web run build | |
| - run: node web/scripts/verify-build-output.mjs | |
| - run: node web/scripts/smoke-subpath-build.mjs | |
| - run: npm --prefix dashboard ci | |
| - run: bash scripts/check-web-audit.sh dashboard | |
| - run: npm --prefix dashboard run type-check | |
| - run: npm --prefix dashboard run lint | |
| - run: npm --prefix dashboard test | |
| - run: npm --prefix dashboard run build | |
| - run: npm --prefix client-ts ci --ignore-scripts | |
| - run: npm --prefix client-ts audit --audit-level=moderate | |
| - run: npm --prefix client-ts run lint | |
| - run: npm --prefix client-ts run build | |
| linux-aarch64: | |
| name: Linux AArch64 | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-unknown-linux-musl | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # Swatinem/rust-cache@v2 | |
| - name: Prefer rustup toolchain binaries | |
| run: dirname "$(rustup which cargo)" >> "$GITHUB_PATH" | |
| - name: Install musl toolchain | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools | |
| - name: Check native GNU build | |
| run: cargo check --workspace --all-targets | |
| - name: Check static musl build | |
| run: cargo check -p slskr --target aarch64-unknown-linux-musl |