Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add adjustments from other projects and release 0.4.1 #16

Merged
merged 8 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ubuntu packages
UBUNTU_PACKAGES=
# Windows packages
WINDOWS_PACKAGES=
# macOS packages
MACOS_PACKAGES=
23 changes: 8 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just
- run: sudo apt-get install -y codespell
- name: Check spelling
run: just spelling
uses: codespell-project/actions-codespell@v2

formatting:
name: Check formatting
Expand All @@ -34,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just
- uses: taiki-e/install-action@just
- run: rustup install nightly
- run: rustup component add rustfmt --toolchain nightly
- name: Check formatting
Expand All @@ -51,24 +49,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just
- uses: taiki-e/install-action@just
- run: just install-packages
- name: Run unit tests
run: just tests

deps:
name: Check dependencies
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just cargo-deny
- name: Run dependencies check
run: just dependencies
uses: EmbarkStudios/cargo-deny-action@v1

lints:
name: Clippy lints
Expand All @@ -81,6 +73,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just
- uses: taiki-e/install-action@just
- run: just install-packages
- name: Check for lints
run: just lints
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
/Cargo.lock
21 changes: 20 additions & 1 deletion .justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env -S just --working-directory . --justfile
# Load project-specific properties from the `.env` file

set dotenv-load := true

# Since this is a first recipe it's being run by default.
# Faster checks need to be executed first for better UX. For example

# codespell is very fast. cargo fmt does not need to download crates etc.

# Perform all checks
check: spelling formatting docs lints dependencies tests

# Checks common spelling mistakes
Expand Down Expand Up @@ -31,6 +36,16 @@ tests:
docs:
cargo doc --no-deps

# Installs packages required to build
[linux]
install-packages:
sudo apt-get install --assume-yes --no-install-recommends $UBUNTU_PACKAGES

[macos]
[windows]
install-packages:
echo no-op

# Checks for commit messages
check-commits REFS='main..':
#!/usr/bin/env bash
Expand All @@ -57,13 +72,17 @@ check-commits REFS='main..':
# Fixes common issues. Files need to be git add'ed
fix:
#!/usr/bin/env bash
set -euo pipefail
if ! git diff-files --quiet ; then
echo "Working tree has changes. Please stage them: git add ."
exit 1
fi

codespell --write-changes
just --unstable --fmt
# try to fix rustc issues
cargo fix --allow-staged
# try to fix clippy issues
cargo clippy --fix --allow-staged

# fmt must be last as clippy's changes may break formatting
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## v0.4.1

- Expose `TestError` and make a couple of doc improvements. Thanks to @ijackson for implementing this change ([#14](https://github.com/wiktor-k/testresult/pull/14)).

## v0.4.0

Expand Down
Loading
Loading