Skip to content

Test Selective Testing #4498

Test Selective Testing

Test Selective Testing #4498

Workflow file for this run

# Uncommment this to replace the rest of the file when you want to debug stuff in CI
#
#
#name: Run Debug
#
#on:
# push:
# pull_request:
# workflow_dispatch:
#
#jobs:
# debug-windows:
## runs-on: ubuntu-latest
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# with: { fetch-depth: 1 }
#
# - run: ./mill scalalib.test mill.scalalib.LauncherTests.launcher
# env:
# COURSIER_ARCHIVE_CACHE: "C:/coursier-arc"
#
# We run full CI on push builds to main and on all pull requests
#
# To maximize bug-catching changes while keeping CI times reasonable, we run
# all tests on Linux, scattered between Java 11/17, except for one job run
# on MacOS instead and a subset of jobs also run on windows
name: Run Tests
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
# cancel older runs of a pull request;
# this will not cancel anything for normal git pushes
concurrency:
# * For runs on other repos, always use the `ref_name` so each branch only can have one concurrent run
# * For runs on `com-lihaoyi/mill`, use `head_ref` to allow one concurrent run per PR, but `run_id` to
# allow multiple concurrent runs in master
group: cancel-old-pr-runs-${{ github.workflow }}-${{ (github.repository != 'com-lihaoyi/mill' && github.ref_name) || (github.head_ref || github.run_id) }}
cancel-in-progress: true
jobs:
cross-plat:
if: (github.event.action == 'ready_for_review') || (github.event.pull_request.draft == false)
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 1 }
- uses: ./.github/actions/pre-build-setup
with:
os: ubuntu-24.04-arm
java-version: 17
shell: bash
- uses: ./.github/actions/post-build-setup
with:
java-version: 17
os: ubuntu-24.04-arm
# - run: cat out/mill-selective-execution.json
# - run: cat out/mill-build/methodCodeHashSignatures.dest/current/spanningInvalidationTree.json
- run: ./mill -i -k selective.prepare 'example.javalib.basic[1-simple].native.server.test'
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/spanningInvalidationTree.json
# - run: cat out/mill-selective-execution.json
# - run: ./mill -i -k selective.resolve 'example.javalib.basic[1-simple].native.server.test'
# - run: ./mill -i -k selective.resolveTree 'example.javalib.basic[1-simple].native.server.test'
# - run: ./mill -i -k selective.resolveChanged 'example.javalib.basic[1-simple].native.server.test'
# Jobs are listed in rough order of priority: if multiple jobs fail, the first job
# in the list should be the one that's most worth looking into
build-linux:
if: (github.event.action == 'ready_for_review') || (github.event.pull_request.draft == false)
uses: ./.github/workflows/pre-build.yml
with:
os: ubuntu-latest
shell: bash
linux:
needs: build-linux
runs-on: ubuntu-latest
steps:
- uses: coursier/cache-action@v6
- uses: actions/download-artifact@v4
with:
path: .
name: ubuntu-latest-artifact
- uses: ./.github/actions/post-build-setup
with:
java-version: 17
os: ubuntu-latest
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/4-methodCodeHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/7-transitiveCallGraphHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
# - run: cat out/mill-selective-execution.json
- run: ./mill -i --debug -k selective.prepare 'example.javalib.basic[1-simple].native.server.test'
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/7-transitiveCallGraphHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/4-methodCodeHashes.json | jq '.["build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
- run: cat out/mill-build/methodCodeHashSignatures.dest/current/5-prettyCallGraph.json | jq '.["def build_.dist.package_$native$.$anonfun$executableRaw$8(os.Path,scala.collection.immutable.Seq,java.io.OutputStream)void"]'
# - run: cat out/mill-selective-execution.json
# - run: ./mill -i -k selective.resolve 'example.javalib.basic[1-simple].native.server.test'
# - run: ./mill -i -k selective.resolveTree 'example.javalib.basic[1-simple].native.server.test'
# - run: ./mill -i -k selective.resolveChanged 'example.javalib.basic[1-simple].native.server.test'