Improve find_by_uri return type to return a reference (like other fin… #38
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: Tests | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
clippy: | |
name: 📎 fmt and clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup update && rustup component add clippy rustfmt && cargo install cargo-deny | |
- run: cargo fmt -- --check | |
- run: cargo clippy --all --all-targets --all-features | |
- run: cargo deny check | |
test: | |
name: 🧪 Tests | |
runs-on: ubuntu-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cargo build --all-features | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
cov: | |
name: ☂️ Coverage | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop-nightly | |
options: --security-opt seccomp=unconfined | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate code coverage | |
run: bash ./scripts/cov.sh | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: false | |
# token: ${{secrets.CODECOV_TOKEN}} | |
docs: | |
name: 📖 Update docs | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: bash ./scripts/docs-install.sh | |
- uses: Swatinem/rust-cache@v2 | |
- run: bash ./scripts/docs-build.sh | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './target/doc' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |