53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: Desktop core (Gitea)
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'desktop-core/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.gitea/workflows/desktop-core.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'desktop-core/**'
|
|
- 'rust-toolchain.toml'
|
|
- '.gitea/workflows/desktop-core.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
desktop-core:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: https://git.vezha.io/actions/checkout@v4
|
|
|
|
- name: Install Rust 1.99.0
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if ! command -v rustup >/dev/null 2>&1; then
|
|
apt-get update -qq
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends ca-certificates curl build-essential
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o /tmp/rustup-init.sh
|
|
sh /tmp/rustup-init.sh -y --default-toolchain none --profile minimal
|
|
rm -f /tmp/rustup-init.sh
|
|
fi
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
rustup toolchain install 1.99.0 --profile minimal --component rustfmt --component clippy
|
|
rustup default 1.99.0
|
|
rustc --version
|
|
|
|
- name: Format
|
|
working-directory: desktop-core
|
|
run: cargo fmt --check
|
|
|
|
- name: Tests
|
|
working-directory: desktop-core
|
|
run: cargo test --locked
|
|
|
|
- name: Clippy
|
|
working-directory: desktop-core
|
|
run: cargo clippy --locked --all-targets -- -D warnings
|