Features
Test results cache
What you do
Build the tests with
xcodebuild build-for-testinginto a known DerivedData.Add the test-cache step right after it.
- uses: warmbuild/action/test-cache@v1.14.2 id: tests with: derived-data: ${{ runner.temp }}/dd destination: id=${{ env.UDID }}Run
test-without-buildingwith$WARMBUILD_ONLY_TESTING, unlesstestsisnone.
What you get
Test targets whose built products passed before are skipped and reported with that run's result. When every target passed before, the Simulator need not boot.
Optional, on pushes and pull requests: the warmbuild/action/test-cache step goes between
xcodebuild build-for-testing and xcodebuild test-without-building.
- The key: one per test target, from every product the tests load (the test bundle, its host app, the UI test runner), the target’s settings in the
.xctestrun, the destination’s runtime and device type, and the Xcode version. - What it writes:
$WARMBUILD_ONLY_TESTINGwith the workflow’s ownargs, test selection’s arguments, and-skip-testingfor each reused target. Pass it totest-without-building. - Nothing left to run: the step’s
testsoutput isnone; skip the Simulator boot and the test step withif: steps.tests.outputs.tests != 'none'. - Anything else that changes results (a fixture version, a server under test) goes in
extra-key.cache-tests: falseruns every target and still records the ones that pass. - The job summary lists each target as reused (with the run and commit it came from) or run.
Swift packages
Package tests and package builds (swift test, a package’s xcodebuild build) have no
products to hash first. The warmbuild/action/step-cache step keys them instead, and skips the
command when that key passed before:
- every file of the package and its local dependencies, and
Package.resolved; - the command, Xcode and the destination.
Inputs and a full workflow are in the Action’s README.