Release 2024.3.7 #1681
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
name: test | |
on: | |
push: | |
tags: ["v*"] | |
branches: ["main", "mise"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
MISE_TRUSTED_CONFIG_PATHS: ${{ github.workspace }} | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
#container: ghcr.io/jdx/mise:github-actions | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || github.token }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: unit | |
save-if: ${{ github.ref_name == 'main' }} | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest,just,cargo-deny,cargo-msrv,cargo-machete,usage-cli | |
- name: Install direnv | |
run: sudo apt-get update; sudo apt-get install direnv | |
- run: cargo nextest run --all-features | |
env: | |
RUST_BACKTRACE: "1" | |
- run: cargo deny check | |
- run: cargo msrv verify | |
- run: cargo machete --with-metadata | |
- run: ./scripts/test-standalone.sh | |
- run: cargo build --all-features | |
- run: ./target/debug/mise settings set experimental true | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.local/share/mise/installs | |
~/.local/share/mise/plugins | |
key: v0-mise-tools-${{ hashFiles('.mise.toml') }} | |
restore-keys: v0-mise-tools | |
- run: ./target/debug/mise install | |
- run: ./target/debug/mise run render | |
- run: ./target/debug/mise run lint-fix | |
- run: git diff HEAD | |
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'jdx/mise' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
push: true | |
author_name: mise[bot] | |
author_email: 123107610+mise-en-dev@users.noreply.github.com | |
- run: ./target/debug/mise run lint | |
coverage: | |
name: coverage-${{matrix.tranche}} | |
#container: ghcr.io/jdx/mise:github-actions | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
tranche: [0, 1, 2, 3] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
#- run: rustup toolchain install nightly --component llvm-tools-preview --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: coverage | |
save-if: ${{ github.ref_name == 'main' }} | |
- run: sudo apt-get update; sudo apt-get install zsh fish direnv | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-llvm-cov,just,usage-cli | |
- name: Test w/ coverage | |
uses: nick-fields/retry@v3 | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RUST_BACKTRACE: "1" | |
MISE_GITHUB_BOT_TOKEN: ${{ secrets.RTX_GITHUB_BOT_TOKEN }} | |
TEST_TRANCHE: ${{matrix.tranche}} | |
TEST_TRANCHE_COUNT: 4 | |
TEST_ALL: ${{github.ref_name == 'release' && '1' || '0'}} | |
with: | |
timeout_minutes: 30 | |
max_attempts: 2 | |
command: just test-coverage | |
- name: Run codacy-coverage-reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
continue-on-error: true | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: lcov.info | |
# - name: Upload to codecov.io | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# fail_ci_if_error: false | |
# files: lcov.info |