Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PR for autofix #4325

Merged
merged 16 commits into from
Jan 14, 2025
31 changes: 7 additions & 24 deletions .github/workflows/autofix-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,12 @@ jobs:
env:
REPO_DEPLOY_KEY: ${{ secrets.REPO_DEPLOY_KEY }}
steps:
# - uses: dawidd6/action-download-artifact@v7
# with:
# run_id: ${{ github.event.workflow_run.id }}
# workflow_conclusion: ""
# name: autofix-artifacts
- uses: dawidd6/action-download-artifact@v7
with:
run_id: ${{ github.event.workflow_run.id }}
workflow_conclusion: ""
name: autofix-artifacts

# - run: "chmod -R 777 ."
# - run: cat .autofix-repo
# - run: cat .autofix-branch
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- run: >
ci/publish-docs.sh
# if git diff --quiet HEAD~1; then
# echo "The latest commit is empty (no changes)."
# else
# git show

# echo $REPO_DEPLOY_KEY | base64 --decode > deploy_key
- run: "chmod -R 777 ."

# eval "$(ssh-agent -s)"
# chmod 600 deploy_key
# ssh-add deploy_key
# rm deploy_key
# git push git@github.com:com-lihaoyi/mill.git HEAD:test-autofix-branch
# fi
- run: ci/push-autofix.sh
5 changes: 3 additions & 2 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: ./mill -i mill.scalalib.scalafmt.ScalafmtModule/
- run: git clean -xdf

Expand All @@ -15,8 +16,8 @@ jobs:

- run: echo "git@github.com:${{ github.event.pull_request.head.repo.full_name }}.git"
- run: echo ${{ github.event.pull_request.head.ref }}
- run: echo "git@github.com:${{ github.event.pull_request.head.repo.full_name }}.git" > .autofix-repo
- run: echo HEAD:${{ github.event.pull_request.head.ref }} > .autofix-branch
- run: echo -n "git@github.com:${{ github.event.pull_request.head.repo.full_name }}.git" > .autofix-repo
- run: echo -n HEAD:${{ github.event.pull_request.head.ref }} > .autofix-branch


- uses: actions/upload-artifact@v4.5.0
Expand Down
20 changes: 20 additions & 0 deletions ci/push-autofix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -eu

# Prepare ssh-key for git actions
echo $REPO_DEPLOY_KEY | base64 --decode > deploy_key

eval "$(ssh-agent -s)"
chmod 600 deploy_key
ssh-add deploy_key
rm deploy_key

# Prepare git user
git config user.email "haoyi.sg+travis@gmail.com"
git config user.name "Mill GitHub Bot"

cat .autofix-repo
cat .autofix-branch
# skip git hooks
git push --no-verify $(cat .autofix-repo) HEAD:$(cat .autofix-branch)
3 changes: 2 additions & 1 deletion scalajslib/src/mill/scalajslib/ScalaJSModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import mill.scalalib.bsp.{ScalaBuildTarget, ScalaPlatform}
import mill.T

trait ScalaJSModule extends scalalib.ScalaModule { outer =>
def scalaJSVersion: T[String]
//
def scalaJSVersion: T[String]

trait ScalaJSTests extends ScalaTests with TestScalaJSModule {
override def scalaJSVersion = outer.scalaJSVersion()
Expand Down
Loading