Develop v0.5.0 #190
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: main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
RUST_TOOLCHAIN_VERSION : "nightly" | |
jobs: | |
check_code_format_and_lint: | |
name: Check code formatting and linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: setup toolchain | |
uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ env.RUST_TOOLCHAIN_VERSION }} | |
- name: install_dependencies | |
run: sudo apt install libdbus-1-dev pkg-config | |
- name: check-fmt | |
run: cargo fmt --check | |
- name: clippy | |
run: cargo clippy -- -D warnings | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
name: Build and test manga tui | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- name: setup toolchain | |
uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ env.RUST_TOOLCHAIN_VERSION }} | |
- name: Install dependencies (Linux only) | |
if: runner.os == 'Linux' | |
run: sudo apt install libdbus-1-dev pkg-config | |
- name: check | |
run: cargo check --locked | |
- name: build | |
run: cargo build --release --verbose | |
- name: install cargo nextest | |
run: cargo install [email protected] | |
- name: test | |
run: cargo nextest run --no-fail-fast | |
- name: run ignored tests | |
run: cargo nextest run -- --ignored | |
build_nix_targets: | |
name: Build Nix targets | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: "write" | |
contents: "read" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v3 | |
- name: Activate Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
with: | |
use-flakehub: false | |
- name: install_dependencies | |
run: sudo apt install libdbus-1-dev pkg-config | |
- name: Build default package | |
run: nix build |