Skip to content

Ensure we check and test all feature combinations #9

Ensure we check and test all feature combinations

Ensure we check and test all feature combinations #9

Workflow file for this run

name: Continuous integration
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
merge_group:
env:
RUSTFLAGS: -D warnings
defaults:
run:
shell: bash
jobs:
format:
name: Check format
runs-on: ubuntu-latest
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Checkout sources
uses: actions/checkout@v4
- name: Check format
run: cargo fmt --all --check
check:
name: Check all features
runs-on: ubuntu-latest
steps:
- name: Install cargo-hack
run: |
curl -L https://github.com/taiki-e/cargo-hack/releases/download/v0.6.20/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | gunzip - > cargo
chmod +x cargo
sudo mv cargo /usr/bin/cargo
- name: Run hack check
run: /usr/bin/cargo hack check --feature-powerset --optional-deps
clippy:
name: Check clippy
runs-on: ubuntu-latest
steps:
- name: Install cargo-hack
run: |
curl -L https://github.com/taiki-e/cargo-hack/releases/download/v0.6.20/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | gunzip - > cargo
chmod +x cargo
sudo mv cargo /usr/bin/cargo
- name: Run hack clippy
run: /usr/bin/cargo hack clippy --feature-powerset --optional-deps --all-targets --tests
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Install cargo-hack
run: |
curl -L https://github.com/taiki-e/cargo-hack/releases/download/v0.6.20/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | gunzip - > cargo
chmod +x cargo
sudo mv cargo /usr/bin/cargo
- name: Run hack test
run: /usr/bin/cargo hack test --feature-powerset --optional-deps