Merge pull request #219 from crepererum-oss/dependabot/github_actions… #630
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: CI | |
# yamllint disable-line rule:truthy | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: yamllint | |
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1 | |
with: | |
strict: true | |
- name: Install Toolchain | |
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master | |
with: | |
toolchain: stable | |
- name: Cache | |
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
- 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 |