diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8564e58..927d6cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,12 +77,8 @@ jobs: test_package: name: Test Package runs-on: ubuntu-latest - strategy: - matrix: - package: [terminal-colorsaurus, termtheme] steps: - uses: actions/checkout@v4 - - name: Package - run: cargo package -p ${{matrix.package}} - - name: Test Package - run: (cd target/package/${{matrix.package}}-*/ && cargo test) + - run: sudo apt-get install just + - run: just test-package terminal-colorsaurus + - run: just test-package termtheme diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..ee686be --- /dev/null +++ b/Justfile @@ -0,0 +1,10 @@ +default: + just --list + +test-package name *args: + #!/usr/bin/env bash + set -euxo pipefail + CARGO_TARGET_DIR=$(mktemp -d); export CARGO_TARGET_DIR + trap 'rm -rf "$CARGO_TARGET_DIR"' EXIT + cargo package -p "{{name}}" {{args}} + (cd $CARGO_TARGET_DIR/package/{{name}}-*/ && cargo test)