name: CI on: push: pull_request: types: [ assigned, opened, synchronize, reopened ] branches: - main jobs: build_and_test: name: Rust project runs-on: ubuntu-latest steps: - name: Checkout source uses: actions/checkout@v3 - name: Get Rust uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable components: rustfmt, clippy - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - name: Cargo check uses: actions-rs/cargo@v1 with: command: check args: --workspace --all-targets --all-features - name: Build uses: actions-rs/cargo@v1 with: command: build - name: Setup Test Environment run: docker-compose up -d - name: Cargo Test uses: actions-rs/cargo@v1 with: command: test args: -- --skip session_close - name: Cargo Test Session Close uses: actions-rs/cargo@v1 with: command: test args: -- session_close - name: Cargo clippy uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features - name: Cargo audit uses: actions-rs/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }}