Skip to content

chore: Upgrade test deps to ensure compatibility with Scala Native #297

chore: Upgrade test deps to ensure compatibility with Scala Native

chore: Upgrade test deps to ensure compatibility with Scala Native #297

Workflow file for this run

name: ci
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch: # be able to manually trigger a workflow run
env:
SCALA_NEXT_VERSION: '3.7.4'
# TODO: perherps, it would be nice to allow failure on `SCALA_NEXT_VERSION` as a warning
# to avoid too strict dev experiences in the future improvements.
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17', '21', '25']
steps:
- uses: actions/checkout@v6
- name: Run tests
run: |
sed -i 's#//| mill-jvm-version: 25#//| mill-jvm-version: ${{ matrix.java }}#' build.mill
./mill -i -DscalaNextVersion=${{ env.SCALA_NEXT_VERSION }} __.publishArtifacts + __.test
test-macos:
runs-on: macos-latest
strategy:
matrix:
java: ['17', '21', '25']
steps:
- uses: actions/checkout@v6
- name: Run tests
run: |
sed -i '' 's#//| mill-jvm-version: 25#//| mill-jvm-version: ${{ matrix.java }}#' build.mill
./mill -i -DscalaNextVersion=${{ env.SCALA_NEXT_VERSION }} __.publishArtifacts + __.test
# Failed to parse `license.zip` on Windows CI, needs further investigation, see
# https://github.com/com-lihaoyi/requests-scala/actions/runs/24759357647/job/72439599258#step:3:1045
#
# test-windows:
# needs: [test-linux, test-macos]
# runs-on: windows-latest
# strategy:
# matrix:
# java: ['17'] # Please match to `mill-jvm-version` in build.mill for Windows since no `sed` command is applied to it
# steps:
# - uses: actions/checkout@v6
# - name: Run tests
# run: |
# .\mill -i "-DscalaNextVersion=${{ env.SCALA_NEXT_VERSION }}" __.publishArtifacts + __.test
check-binary-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check Binary Compatibility
run: ./mill -i -DscalaNextVersion=${{ env.SCALA_NEXT_VERSION }} __.mimaReportBinaryIssues
publish-sonatype:
if: github.repository == 'com-lihaoyi/requests-scala' && contains(github.ref, 'refs/tags/')
needs: test-linux
runs-on: ubuntu-latest
env:
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
MILL_PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
LANG: "en_US.UTF-8"
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v6
- name: Publish to Maven Central
run: ./mill -i mill.scalalib.SonatypeCentralPublishModule/
- name: Create GitHub Release
id: create_gh_release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false