paperless-rs 0.1.2

An asynchronous Rust library for the Paperless-ngx document manager
Documentation
name: Github CI - Development

on:
  push:
    branches: [ develop, master ]

jobs:
  setup-and-build:
    name: Setup and build
    runs-on: ubuntu-latest
    permissions:
      contents: read

    steps:
      - name: ๐Ÿ“ Check out the repository
        uses: actions/checkout@v4.1.1

      - name: ๐Ÿ“ฆ Cache Rust toolchain
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: rust-toolchain-

      - name: ๐Ÿ› ๏ธ Set up Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: rustfmt, clippy

      - name: โœ… Check with Clippy linter
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings

      - name: ๐Ÿ’„ Format code with Cargo formatter
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

      - name: ๐Ÿฆ€ Install Rust dependencies and build library
        uses: actions-rs/cargo@v1
        with:
          command: build

  integration-tests:
    name: Integration tests
    runs-on: ubuntu-latest
    needs: setup-and-build
    permissions:
      contents: read

    services:
      hello-world:
        image: hello-world

    steps:
      - name: ๐Ÿ“ Check out the repository
        uses: actions/checkout@v4.1.1

      - name: ๐Ÿ“ฆ Cache Rust toolchain
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: rust-toolchain-

      - name: ๐Ÿ› ๏ธ Set up Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable

      - name: ๐Ÿงช Run integration tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: -- --test-threads=1