Merge pull request #629 from Relm4/action-clone-fix #1253
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 | |
on: | |
push: | |
branches: [ main, stable, next ] | |
pull_request: | |
branches: [ main, stable, next ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/relm4/relm4/docs:latest | |
env: | |
DISPLAY: ":99.0" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: "test" | |
run: xvfb-run --auto-servernum cargo test | |
- uses: bcomnes/cleanup-xvfb@v1.0.9 | |
clippy: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/relm4/relm4/docs:latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- nightly | |
- "1.75.0" | |
env: | |
DISPLAY: ":99.0" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy | |
- name: "clippy all targets" | |
run: cargo clippy --all-targets -- --deny warnings | |
- name: "clippy check examples" | |
run: cargo clippy --examples -- --deny warnings | |
- name: "clippy all features" | |
run: cargo clippy --features "all" -- --deny warnings | |
- name: "clippy check examples with all features" | |
run: cargo clippy --examples --all-features -- --deny warnings | |
fmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: "Check if the formatting is correct" | |
run: cargo fmt --all -- --check | |
docs: | |
name: check-docs | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: "-D warnings" | |
RUSTFLAGS: --cfg docsrs | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: "Build docs for all features" | |
run: cargo doc --all-features | |
codespell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: codespell-project/actions-codespell@master | |
with: | |
check_filenames: true | |
ignore_words_list: crate,statics,relm |