Skip to content

CI

CI #828

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on:
pull_request:
merge_group:
push:
branches:
- main
tags:
- v*
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: yamllint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
with:
strict: true
test:
strategy:
matrix:
target:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.target }}
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install Toolchain
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # master
with:
toolchain: stable
- name: Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-features --all-targets --workspace -- -D warnings
- name: cargo build
run: cargo build --workspace --all-features
- name: cargo test (with integration tests)
run: cargo test --all-features --workspace
if: '(env.TUTANOTA_CLI_USERNAME != null) && (env.TUTANOTA_CLI_PASSWORD != null)'
env:
TUTANOTA_CLI_USERNAME: ${{ secrets.TUTANOTA_CLI_USERNAME }}
TUTANOTA_CLI_PASSWORD: ${{ secrets.TUTANOTA_CLI_PASSWORD }}
- name: cargo test (NO integration tests)
run: cargo test --all-features --workspace -- --skip integration
if: '!((env.TUTANOTA_CLI_USERNAME != null) && (env.TUTANOTA_CLI_PASSWORD != null))'
env:
TUTANOTA_CLI_USERNAME: ${{ secrets.TUTANOTA_CLI_USERNAME }}
TUTANOTA_CLI_PASSWORD: ${{ secrets.TUTANOTA_CLI_PASSWORD }}
- name: cargo doc
run: cargo doc --document-private-items --no-deps --all-features --workspace
- name: cargo bench
run: cargo bench --profile=dev --all-features --workspace -- --test