Skip to content

Commit

Permalink
Merge branch 'main' into pr/bom-modules-cs-project
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jan 7, 2025
2 parents 1ca26c7 + 5755423 commit 273aa5f
Show file tree
Hide file tree
Showing 110 changed files with 3,389 additions and 562 deletions.
3 changes: 2 additions & 1 deletion .config/mill-version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.12.4
0.12.5

4 changes: 1 addition & 3 deletions .github/actions/post-build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ runs:
java-version: ${{ inputs.java-version }}
distribution: temurin

- uses: actions/checkout@v4

# Need to fix cached artifact file permissions because github actions screws it up
# https://github.com/actions/upload-artifact/issues/38
- run: "chmod -R +x ."
- run: "chmod -R 777 ."
shell: bash

- uses: coursier/cache-action@v6
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/post-build-raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ jobs:
continue-on-error: false
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: .
name: ${{ inputs.os }}-artifact

- uses: ./.github/actions/post-build-setup
with:
java-version: ${{ inputs.java-version }}
os: ${{ inputs.os }}

- uses: actions/download-artifact@v4
with:
path: .
name: ${{ inputs.os }}-artifact

- run: ${{ inputs.buildcmd }}
39 changes: 32 additions & 7 deletions .github/workflows/post-build-selective.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,16 @@ jobs:
continue-on-error: false
timeout-minutes: ${{ inputs.timeout-minutes }}
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/post-build-setup
with:
java-version: ${{ inputs.java-version }}
os: ${{ inputs.os }}

- uses: actions/download-artifact@v4
with:
path: .
name: ${{ inputs.os }}-artifact

- run: chmod -R 777 . # normalize permissions before and after upload/download-artifact
- uses: ./.github/actions/post-build-setup
with:
java-version: ${{ inputs.java-version }}
os: ${{ inputs.os }}

- uses: actions/download-artifact@v4
with:
Expand All @@ -53,12 +50,40 @@ jobs:
if: ${{ inputs.install-android-sdk }}
with:
log-accepted-android-sdk-licenses: false
cmdline-tools-version: 11076708
packages: tools platform-tools emulator system-images;android-35;google_apis_playstore;x86_64

- name: Enable KVM group perms
if: ${{ inputs.install-android-sdk }}
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Set AVD environment variable globally
if: ${{ inputs.install-android-sdk }}
run: echo "ANDROID_AVD_HOME=/home/runner/.config/.android/avd" >> $GITHUB_ENV

- run: ./mill -i -k selective.resolve ${{ inputs.millargs }}

- run: ./mill -i -j1 -k selective.run ${{ inputs.millargs }}
if: ${{ inputs.install-android-sdk }}

- run: ./mill -i -k selective.run ${{ inputs.millargs }}
if: ${{ !inputs.install-android-sdk }}

- run: 'taskkill -f -im java* && rm -rf out/mill-server/*'
if: startsWith(inputs.os, 'windows')
shell: bash
continue-on-error: true

- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: always() # always run even if the previous step fails
with:
fail_on_failure: false
include_passed: false
detailed_summary: true
annotate_only: true
require_tests: false
report_paths: 'out/**/test-report.xml'
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ jobs:
uses: ./.github/workflows/post-build-raw.yml
with:
java-version: '17'
buildcmd: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources + __.mimaReportBinaryIssues + __.fix --check + mill.javalib.palantirformat.PalantirFormatModule/ --check + mill.kotlinlib.ktlint.KtlintModule/checkFormatAll --check
buildcmd: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources + __.mimaReportBinaryIssues + __.fix --check + mill.javalib.palantirformat.PalantirFormatModule/ --check + mill.kotlinlib.ktlint.KtlintModule/checkFormatAll
4 changes: 2 additions & 2 deletions .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
schedule:
- cron: '0 0 * * *' # daily
# schedule:
# - cron: '0 0 * * *' # daily
workflow_dispatch:

name: Scala Steward
Expand Down
2 changes: 2 additions & 0 deletions blog/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

* xref:5-executable-jars.adoc[]
* xref:4-flaky-tests.adoc[]
* xref:3-selective-testing.adoc[]
* xref:2-monorepo-build-tool.adoc[]
* xref:1-java-compile.adoc[]
4 changes: 2 additions & 2 deletions blog/modules/ROOT/pages/3-selective-testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ or monorepo: picking which tests to run to validate a change or pull-request, be
running every test every time is costly and slow. This blog post will explore what
selective testing is all about, the different approaches you can take with selective
testing, based on my experience working on developer tooling and CI for the last decade at
Dropbox and Databricks. Lastly, we will discuss how selective testing is supported by
the Mill build tool.
Dropbox and Databricks. Lastly, we will discuss
xref:mill::large/selective-execution.adoc[how the Mill build tool supports selective testing].

// end::header[]

Expand Down
Loading

0 comments on commit 273aa5f

Please sign in to comment.