Skip to content

Commit

Permalink
Merge pull request #82 from wiktor-k/wiktor/cleanups
Browse files Browse the repository at this point in the history
Use one matrix command for all targets
  • Loading branch information
wiktor-k authored Jun 13, 2024
2 parents 04504ab + da50317 commit 3ba5c29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
include:
- os: windows-latest
windows: true
script: ".\\tests\\sign-and-verify-win.bat"
- os: ubuntu-latest
script: ./tests/sign-and-verify.sh
- os: macos-latest
script: ./tests/sign-and-verify.sh
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -34,8 +37,4 @@ jobs:
- name: Check if the example compiles
run: cargo check --example key-storage
- name: Run integration tests
run: ./tests/sign-and-verify.sh
if: ${{ ! matrix.windows }}
- name: Run integration tests
run: ".\\tests\\sign-and-verify-win.bat"
if: ${{ matrix.windows }}
run: ${{ matrix.script }}
7 changes: 6 additions & 1 deletion .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ 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 @@ -71,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

0 comments on commit 3ba5c29

Please sign in to comment.