Skip to content

add notification reading support #322

add notification reading support

add notification reading support #322

Workflow file for this run

name: CI
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-${{ matrix.target }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-build-${{ env.cache-name }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- name: Install Dependencies
run: sudo apt -y install at-spi2-core systemd dunst xvfb
- name: setup dbus and notification daemon
run:
sudo systemctl start dbus;
systemctl --user start dbus;
xvfb-run dunst --screen 0 600x400x8 &
- name: Run tests
run: cargo test
clippy:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: clippy
# "-- -D warnings" will make the job fail if their are clippy warnings
args: --workspace --no-deps -- -D warnings -W clippy::print_stdout
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Run formatter
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
rustdoc:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Generate Documentation
uses: actions-rs/cargo@v1
with:
command: doc
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.PAGES_DEPLOY_KEY }}
external_repository: odilia-app/odilia-app.github.io
publish_dir: ./target/doc
destination_dir: doc/devel
keep_files: true
user_name: github-actions
user_email: [email protected]
publish_branch: main
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }}
coverage:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-${{ matrix.target }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-build-${{ env.cache-name }}-
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: cargo install llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: Install Dependencies
run: sudo apt -y install at-spi2-core systemd dunst xvfb
- name: setup dbus and notification daemon
run:
sudo systemctl start dbus;
systemctl --user start dbus;
xvfb-run dunst --screen 0 600x400x8 &
- name: cargo llvm-cov
run: cargo llvm-cov --locked --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_fail: true
msrv-compliance:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Cache cargo home
uses: actions/cache@v3
env:
cache-name: cache-cargo-home
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu-build-${{ env.cache-name }}-
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install Cargo MSRV Verifier
run: cargo install cargo-msrv --force
- name: Check MSRV Compliance
# check msrv compliance *inside* the binary odilia directory instead of the worksapce
run: cd odilia && cargo msrv verify