release: v0.13.0 #24
This file contains hidden or 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: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Check (library) | |
| run: cargo check --message-format=short | |
| - name: Check (library + CLI) | |
| run: cargo check --features cli --all-targets --message-format=short | |
| - name: Check (library + TUI) | |
| run: cargo check --features tui --all-targets --message-format=short | |
| - name: Clippy | |
| run: cargo clippy --features tui --all-targets -- -D warnings | |
| - name: Test | |
| run: | | |
| set -o pipefail | |
| CARGO_TERM_COLOR=never cargo test --release --features tui 2>&1 | tee test-output.txt | |
| passed=$(grep '^test result:' test-output.txt | sed 's/.*ok\. \([0-9]*\) passed.*/\1/' | paste -sd+ | bc) | |
| echo "TEST_PASSED=$passed" >> "$GITHUB_ENV" | |
| - name: Update test count badge | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| uses: schneegans/dynamic-badges-action@v1.9.0 | |
| with: | |
| auth: ${{ secrets.GIST_SECRET }} | |
| gistID: 5d6e27e07995772a5bf424d4cf51e608 | |
| filename: test-count.json | |
| label: tests | |
| message: "${{ env.TEST_PASSED }} passed" | |
| color: brightgreen | |
| - name: Build | |
| run: cargo build --features tui --release | |
| # amd64 only: enough to catch a broken Containerfile or control file, without | |
| # paying for the second architecture on every push. | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build .deb | |
| run: make deb | |
| - name: Inspect .deb | |
| run: | | |
| dpkg-deb -I fslog_*_amd64.deb | |
| dpkg-deb -c fslog_*_amd64.deb |