-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
87 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: autofix.ci | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
push: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
MISE_TRUSTED_CONFIG_PATHS: ${{ github.workspace }} | ||
MISE_EXPERIMENTAL: 1 | ||
RUST_BACKTRACE: 1 | ||
NPM_CONFIG_FUND: false | ||
|
||
jobs: | ||
nightly: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
{ toolchain: nightly, components: "rustfmt, clippy", rustflags: "" } | ||
- run: | | ||
cargo build --all-features | ||
echo "$PWD/target/debug" >> "$GITHUB_PATH" | ||
- name: cache mise | ||
uses: actions/cache@v4 | ||
with: | ||
key: mise-tools-ubuntu-latest-${{ hashFiles('.mise.toml') }} | ||
restore-keys: mise-tools-ubuntu-latest | ||
path: | | ||
~/.local/share/mise/installs | ||
~/.local/share/mise/plugins | ||
- run: mise install | ||
- run: npm install | ||
- run: "mise run snapshots ::: lint-fix ::: render && git diff HEAD" | ||
- uses: autofix-ci/[email protected] | ||
if: ${{ always() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ env: | |
MISE_TRUSTED_CONFIG_PATHS: ${{ github.workspace }} | ||
MISE_EXPERIMENTAL: 1 | ||
RUST_BACKTRACE: 1 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.RTX_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
NPM_CONFIG_FUND: false | ||
|
||
permissions: | ||
|
@@ -61,23 +61,8 @@ jobs: | |
- run: cargo msrv verify | ||
- run: cargo machete --with-metadata | ||
- run: ./scripts/test-standalone.sh | ||
- run: mise settings set experimental true | ||
if: ${{ always() }} | ||
- run: mise run render | ||
if: ${{ always() }} | ||
- uses: actions-rust-lang/rustfmt@v1 | ||
if: ${{ always() }} | ||
- run: mise run lint | ||
if: ${{ always() }} | ||
- run: mise run snapshots | ||
if: ${{ always() }} | ||
- run: mise run lint-fix && git diff HEAD | ||
if: ${{ always() }} | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
if: ${{ always() }} | ||
with: | ||
commit_author: mise[bot] <[email protected]> | ||
commit_message: "chore: apply lint fixes" | ||
|
||
nightly: | ||
runs-on: ubuntu-latest | ||
|
@@ -104,11 +89,6 @@ jobs: | |
~/.local/share/mise/plugins | ||
- run: mise install | ||
- run: mise run test:shuffle | ||
- run: mise run lint-fix && git diff HEAD | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_author: mise[bot] <[email protected]> | ||
commit_message: "chore: apply lint fixes" | ||
|
||
coverage: | ||
name: coverage-${{matrix.tranche}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ assert_contains "GITHUB_TOKEN=foobar mise install -f cargo:[email protected] 2>&1" "to | |
assert_contains "GITHUB_API_TOKEN=foobar mise install -f cargo:[email protected] 2>&1" "token=foobar" | ||
|
||
# This should prefer GITHUB_API_TOKEN | ||
assert_contains "GITHUB_TOKEN=foobar GITHUB_API_TOKEN=barquz mise install -f cargo:[email protected] 2>&1" "token=foobar" | ||
assert_contains "GITHUB_API_TOKEN=foobar GITHUB_TOKEN=barquz mise install -f cargo:[email protected] 2>&1" "token=foobar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
mise i dummy@3 tiny@2 | ||
mise use dummy@3 | ||
|
||
assert "mise current" "dummy 3" | ||
assert "mise current dummy" "3" | ||
assert "mise current tiny" "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
# Install and build ruby using ruby-build | ||
|
||
assert_contains "mise ls-remote ruby@3" "3.0.0" | ||
assert_contains "mise ls-remote ruby@truffleruby-24" "truffleruby-24.0.0" | ||
assert_contains "mise ls-remote ruby@truffleruby+graalvm-24" "truffleruby+graalvm-24.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,40 +121,3 @@ static AFTER_LONG_HELP: &str = color_print::cstr!( | |
3.11.0 3.10.0 | ||
"# | ||
); | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use crate::test::reset; | ||
use std::env; | ||
use test_log::test; | ||
|
||
#[test] | ||
fn test_current() { | ||
reset(); | ||
assert_cli_snapshot!("current", @r###" | ||
tiny 3.1.0 | ||
dummy ref:master | ||
"###); | ||
} | ||
|
||
#[test] | ||
fn test_current_with_runtimes() { | ||
reset(); | ||
assert_cli_snapshot!("current", "tiny", @"3.1.0"); | ||
} | ||
|
||
#[test] | ||
fn test_current_missing() { | ||
reset(); | ||
assert_cli!("uninstall", "--all", "dummy"); | ||
|
||
env::set_var("MISE_DUMMY_VERSION", "1.1.0"); | ||
assert_cli_snapshot!("current", @r###" | ||
dummy 1.1.0 | ||
tiny 3.1.0 | ||
mise [email protected] is specified in MISE_DUMMY_VERSION=1.1.0, but not installed | ||
"###); | ||
|
||
env::remove_var("MISE_DUMMY_VERSION"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters