fix loading empty contents always returns 404 response #62
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: Watchdogs | |
on: [push, pull_request] | |
env: | |
TERM: xterm | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
defaults: | |
run: | |
working-directory: v2 | |
jobs: | |
unit-test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: npm ci | |
- run: npm run bundle | |
- run: cargo clippy --all --all-features --benches --tests -- -D warnings | |
- run: cargo test | |
sanity-test: | |
needs: unit-test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
# macos-latest is removed from the OS list since currently the release build crashes on | |
# macOS due to the following issue. The next version of wry crate will solve this issue. | |
# - https://github.com/tauri-apps/wry/issues/1151 | |
# - https://github.com/rhysd/Shiba/actions/runs/7697292527/job/20974017230 | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: npm ci | |
- run: make release | |
- uses: coactions/setup-xvfb@v1 | |
with: | |
run: cargo run --release --features=__sanity -- --debug | |
working-directory: ./v2 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- run: cargo run --release --features=__sanity -- --debug | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Clippy runs on each platforms in `test` job | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: v2 -> v2/target | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: v2/package-lock.json | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3' | |
- run: pip install yamllint | |
- run: sudo bash ./scripts/install_apt_deps.bash | |
- run: npm ci | |
- run: npm run lint:tsc | |
- run: npm run lint:prettier | |
- run: npm run lint:eslint | |
- run: npm run lint:stylelint | |
- run: cargo fmt --all --check | |
- run: shellcheck ./scripts/gen_macos_app.bash ./scripts/install_apt_deps.bash | |
- run: yamllint --strict ./src/assets/default_config.yml |