From 71637f6d37a4318d82ac5bb7f37d582938b59dbf Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 29 Oct 2021 20:44:10 -0700 Subject: [PATCH] Integrate some CI into this project, to see how it works on GitHub. --- .github/workflows/build-testing.yml | 106 ++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/build-testing.yml diff --git a/.github/workflows/build-testing.yml b/.github/workflows/build-testing.yml new file mode 100644 index 0000000..ea81311 --- /dev/null +++ b/.github/workflows/build-testing.yml @@ -0,0 +1,106 @@ +name: build-testing + +on: + pull_request: + push: + branches: + - master + - feature/github-actions + +jobs: + tests: + name: ${{ matrix.rust }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: + - stable + - beta + - nightly + env: + RUST_BACKTRACE: full + RUSTV: ${{ matrix.rust }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + + - name: Check it! + run: | + cargo check --all-targets --profile=test + + - name: Build it! + run: | + cargo build + + - name: Test it! + run: | + cargo test + + rustfmt: + name: rustfmt + runs-on: ubuntu-18.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + components: rustfmt + + - name: Check formatting + run: | + cargo fmt --all -- --check + + clippy: + name: clippy + runs-on: ubuntu-18.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + components: clippy + + - name: Check formatting + run: | + cargo clippy + + docs: + name: docs + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Check documentation + env: + RUSTDOCFLAGS: -D warnings + run: | + cargo doc --no-deps --document-private-items --workspace + + + \ No newline at end of file