diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ce3977e..34b74610 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,15 @@ jobs: if: matrix.build == 'macos' run: cargo build --release + - name: Install Perl (Windows) + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.30" + distribution: strawberry + if: env.IS_MD_FILE == 'false' && runner.os == 'Windows' + - name: Build (Windows) + shell: cmd # Use cmd as the default shell to avoid perl path errors if: matrix.build == 'windows' run: cargo build --release env: diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 4f856a07..b620d7f1 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -2,7 +2,7 @@ name: Test (PR) on: [pull_request] env: - BUILD: "false" + BUILD: false jobs: test: name: Test @@ -69,7 +69,21 @@ jobs: if: env.BUILD == 'true' - name: Run Tests - run: cargo test --verbose -- --test-threads=1 + run: cargo test --verbose env: RUST_BACKTRACE: 1 - if: env.BUILD == 'true' + if: env.IS_MD_FILE == 'false' && runner.os != 'Windows' + + - name: Install Perl (Windows) + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.30" + distribution: strawberry + if: env.IS_MD_FILE == 'false' && runner.os == 'Windows' + + - name: Run Tests (Windows) + run: cargo test --verbose + env: + RUST_BACKTRACE: 1 + shell: cmd + if: env.IS_MD_FILE == 'false' && runner.os == 'Windows' diff --git a/ci/buildvars.sh b/ci/buildvars.sh index fb449bce..c5e5b6d2 100755 --- a/ci/buildvars.sh +++ b/ci/buildvars.sh @@ -2,6 +2,7 @@ # If source files were indeed modified, then this script sets `BUILD=true` set -euo pipefail + SRC_CHANGED_COUNT=$(git diff --numstat HEAD^..HEAD -- '*.rs' '*.yml' '*.toml' 'Dockerfile' | wc -l) if [ $SRC_CHANGED_COUNT != "0" ]; then