Skip to content
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
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
uses: coursier/cache-action@v8.1
- uses: VirtusLab/scala-cli-setup@v1
- name: Check formatting
run: scala-cli --power fmt --check .
# benchmark/ is a separate scala-cli build (competitor deps, JMH) —
# excluded here even for repos without one, since --exclude is a
# no-op glob filter when nothing matches.
run: scala-cli --power fmt --check . --exclude benchmark

test:
name: Test
Expand All @@ -38,7 +41,7 @@ jobs:
- name: Run tests
# Coverage is recorded only for production sources; tests were previously
# measured as 100%-covered and inflated the reported number.
run: scala-cli --power test . -O -coverage-out:./.scoverage -O '-coverage-exclude-files:.*test/.*'
run: scala-cli --power test . --exclude benchmark -O -coverage-out:./.scoverage -O '-coverage-exclude-files:.*test/.*'
- name: Generate coverage
run: scala-cli .scoverage/report.sc
- uses: codecov/codecov-action@v7
Expand All @@ -47,7 +50,7 @@ jobs:
files: .scoverage/report/cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Test documentation
run: scala-cli --power doc .
run: scala-cli --power doc . --exclude benchmark

compile:
name: Compile (${{ matrix.platform }})
Expand Down Expand Up @@ -75,7 +78,7 @@ jobs:
scala-build-${{ matrix.platform }}-
- uses: VirtusLab/scala-cli-setup@v1
- name: Compile
run: scala-cli --power compile . --platform ${{ matrix.platform }} ${{ matrix.args }}
run: scala-cli --power compile . --exclude benchmark --platform ${{ matrix.platform }} ${{ matrix.args }}

# JVM is covered by the `test` job above (with coverage/docs); this just runs
# the same suite on the other targets to catch platform-specific regressions.
Expand Down Expand Up @@ -103,4 +106,4 @@ jobs:
scala-build-${{ matrix.platform }}-
- uses: VirtusLab/scala-cli-setup@v1
- name: Run tests
run: scala-cli --power test . --platform ${{ matrix.platform }} ${{ matrix.args }}
run: scala-cli --power test . --exclude benchmark --platform ${{ matrix.platform }} ${{ matrix.args }}
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# name should differ from the repo slug, e.g. made -> "M&DE".
PROJECT_NAME: ${{ vars.PROJECT_NAME || github.event.repository.name }}
run: |
scala-cli --power doc . -- \
scala-cli --power doc . --exclude benchmark -- \
-project "$PROJECT_NAME" \
-project-version ${{ github.ref_name }} \
-project-footer "made with ❤️ and coffee" \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mima.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
org=$(grep -oP '(?<=using publish.organization ).*' project.scala | tr -d '"')
name=$(grep -oP '(?<=using publish.name ).*' project.scala | tr -d '"')

scala-cli --power package . --library -o "$RUNNER_TEMP/new.jar" --force
shared_cp=$(scala-cli --power compile . --print-class-path | tail -1)
scala-cli --power package . --exclude benchmark --library -o "$RUNNER_TEMP/new.jar" --force
shared_cp=$(scala-cli --power compile . --exclude benchmark --print-class-path | tail -1)

if [ "${{ github.event_name }}" = "pull_request" ]; then
base_sha=$(git rev-parse HEAD^1)
baseline_label="main@${base_sha:0:7}"
echo "Baseline: $baseline_label (does this PR itself introduce a new binary incompatibility?)"
git worktree add --detach --quiet "$RUNNER_TEMP/old-src" "$base_sha"
scala-cli --power package "$RUNNER_TEMP/old-src" --library -o "$RUNNER_TEMP/old.jar" --force
scala-cli --power package "$RUNNER_TEMP/old-src" --exclude benchmark --library -o "$RUNNER_TEMP/old.jar" --force
old_jar="$RUNNER_TEMP/old.jar"
else
base_tag=$(git tag -l 'v*' --sort=-v:refname | head -1)
Expand Down