mirror of
https://github.com/BSchneppe/einvoice-rs.git
synced 2026-03-17 10:24:08 +00:00
96 lines
2.4 KiB
YAML
96 lines
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
|
|
jobs:
|
|
test-suite:
|
|
name: Run Test Suite
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
- os: ubuntu-latest
|
|
target: aarch64-unknown-linux-gnu
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
- os: macos-13 # x86
|
|
target: x86_64-apple-darwin
|
|
- os: macos-14 # M1
|
|
target: aarch64-apple-darwin
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Test library
|
|
uses: houseabsolute/actions-rust-cross@v1
|
|
with:
|
|
command: 'test'
|
|
target: ${{ matrix.target }}
|
|
args: "--all-features --workspace"
|
|
|
|
check-format:
|
|
name: Check formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.83.0
|
|
profile: minimal
|
|
override: true
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.83.0
|
|
profile: minimal
|
|
override: true
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Clippy check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-targets --all-features --workspace -- -D warnings
|
|
|
|
docs:
|
|
name: Docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.83.0
|
|
profile: minimal
|
|
override: true
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Check documentation
|
|
env:
|
|
RUSTDOCFLAGS: -D warnings
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: doc
|
|
args: --no-deps --document-private-items --all-features --workspace --examples
|