diff --git a/.github/actions/check-dirty-git/action.yml b/.github/actions/check-dirty-git/action.yml deleted file mode 100644 index 3959a79..0000000 --- a/.github/actions/check-dirty-git/action.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check dirty git -description: Check the git status of the current directory, and raise an error if there are uncommitted changes. - -runs: - using: composite - steps: - - name: Checking dirty git - shell: bash - run: | - # Workaround for https://github.com/actions/checkout/issues/766 - git config --global --add safe.directory "$GITHUB_WORKSPACE" - - if [[ -n $(git status --porcelain) ]]; then - echo "repo is dirty" - git status - exit 1 - fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 339a64a..1465896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev - name: Rustup update run: rustup update - name: Show cargo version @@ -40,7 +42,7 @@ jobs: - name: Test run: cargo test --all --verbose --locked - name: Check dirty git - uses: ./.github/actions/check-dirty-git + uses: cbeck88/check-dirty-git@v1 # Build and test with no default features build-and-test-no-default-features: @@ -51,6 +53,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev - name: Rustup update run: rustup update - name: Show cargo version @@ -66,7 +70,35 @@ jobs: - name: Test run: cargo test --no-default-features --verbose --locked - name: Check dirty git - uses: ./.github/actions/check-dirty-git + uses: cbeck88/check-dirty-git@v1 + + # Build and test with all features + build-and-test-all-features: + runs-on: ubuntu-latest + + env: + RUSTFLAGS: --deny warnings + + steps: + - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev + - name: Rustup update + run: rustup update + - name: Show cargo version + run: cargo --version + - name: Rust build caching + uses: Swatinem/rust-cache@v2 + with: + workspaces: . -> target + key: all-features + save-if: ${{ github.ref == 'refs/heads/master' }} + - name: Build + run: cargo check --all-features --verbose --locked + - name: Test + run: cargo test --all-features --verbose --locked + - name: Check dirty git + uses: cbeck88/check-dirty-git@v1 # Linting and formatting lint: @@ -74,6 +106,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev - name: Rustup update and install nightly run: | rustup update diff --git a/README.md b/README.md index 600df48..4a61435 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ An extensible monitoring tool, sending alerts via Signal messenger, and respondi [![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE-APACHE) [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT) +[![Build Status](https://img.shields.io/github/actions/workflow/status/cbeck88/signal-gateway/ci.yml?branch=master&style=flat-square)](https://github.com/cbeck88/signal-gateway/actions/workflows/ci.yml?query=branch%3Amaster) ## Overview