mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-27 18:51:13 -04:00
137 lines
2.9 KiB
YAML
137 lines
2.9 KiB
YAML
name: Rust tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test-matrix-sdk-features:
|
|
name: 🐧 matrix-sdk, ${{ matrix.name }}
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
name:
|
|
- no-encryption
|
|
- no-sled
|
|
- no-encryption-and-sled
|
|
- sled-cryptostore
|
|
- rustls-tls
|
|
- markdown
|
|
- socks
|
|
- sso-login
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci test-features ${{ matrix.name }}
|
|
|
|
test-matrix-sdk-crypto:
|
|
name: 🐧 matrix-sdk-crypto
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci test-crypto
|
|
|
|
test-all-crates:
|
|
name: ${{ matrix.name }}
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
name:
|
|
- name: 🐧 all crates, 🦀 stable
|
|
rust: stable
|
|
os: ubuntu-latest
|
|
|
|
- name: 🐧 all crates, 🦀 beta
|
|
rust: beta
|
|
os: ubuntu-latest
|
|
|
|
- name: 🍏 all crates, 🦀 stable
|
|
rust: stable
|
|
os: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: nextest
|
|
args: run
|
|
|
|
- name: Test documentation
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --doc
|