Skip more CI checks to speed things up

This commit is contained in:
Zanie 2023-10-25 14:25:06 -05:00
parent 4288d8a6f4
commit fc6a3c1c71
1 changed files with 128 additions and 128 deletions

View File

@ -67,20 +67,20 @@ jobs:
run: rustup component add rustfmt
- run: cargo fmt --all --check
cargo-clippy:
name: "cargo clippy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: |
rustup component add clippy
rustup target add wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: "Clippy"
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: "Clippy (wasm)"
run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings
# cargo-clippy:
# name: "cargo clippy"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: "Install Rust toolchain"
# run: |
# rustup component add clippy
# rustup target add wasm32-unknown-unknown
# - uses: Swatinem/rust-cache@v2
# - name: "Clippy"
# run: cargo clippy --workspace --all-targets --all-features -- -D warnings
# - name: "Clippy (wasm)"
# run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings
# cargo-test:
# strategy:
@ -243,124 +243,124 @@ jobs:
name: ecosystem-result
path: ecosystem-result
cargo-udeps:
name: "cargo udeps"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install nightly Rust toolchain"
# Only pinned to make caching work, update freely
run: rustup toolchain install nightly-2023-10-15
- uses: Swatinem/rust-cache@v2
- name: "Install cargo-udeps"
uses: taiki-e/install-action@cargo-udeps
- name: "Run cargo-udeps"
run: cargo +nightly-2023-10-15 udeps
# cargo-udeps:
# name: "cargo udeps"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: "Install nightly Rust toolchain"
# # Only pinned to make caching work, update freely
# run: rustup toolchain install nightly-2023-10-15
# - uses: Swatinem/rust-cache@v2
# - name: "Install cargo-udeps"
# uses: taiki-e/install-action@cargo-udeps
# - name: "Run cargo-udeps"
# run: cargo +nightly-2023-10-15 udeps
python-package:
name: "python package"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- uses: Swatinem/rust-cache@v2
- name: "Prep README.md"
run: python scripts/transform_readme.py --target pypi
- name: "Build wheels"
uses: PyO3/maturin-action@v1
with:
args: --out dist
- name: "Test wheel"
run: |
pip install --force-reinstall --find-links dist ${{ env.PACKAGE_NAME }}
ruff --help
python -m ruff --help
- name: "Remove wheels from cache"
run: rm -rf target/wheels
# python-package:
# name: "python package"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# architecture: x64
# - uses: Swatinem/rust-cache@v2
# - name: "Prep README.md"
# run: python scripts/transform_readme.py --target pypi
# - name: "Build wheels"
# uses: PyO3/maturin-action@v1
# with:
# args: --out dist
# - name: "Test wheel"
# run: |
# pip install --force-reinstall --find-links dist ${{ env.PACKAGE_NAME }}
# ruff --help
# python -m ruff --help
# - name: "Remove wheels from cache"
# run: rm -rf target/wheels
pre-commit:
name: "pre-commit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Install Rust toolchain"
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: "Install pre-commit"
run: pip install pre-commit
- name: "Cache pre-commit"
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: "Run pre-commit"
run: |
echo '```console' > $GITHUB_STEP_SUMMARY
# Enable color output for pre-commit and remove it for the summary
SKIP=cargo-fmt,clippy,dev-generate-all pre-commit run --all-files --show-diff-on-failure --color=always | \
tee >(sed -E 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[mGK]//g' >> $GITHUB_STEP_SUMMARY) >&1
exit_code=${PIPESTATUS[0]}
echo '```' >> $GITHUB_STEP_SUMMARY
exit $exit_code
# pre-commit:
# name: "pre-commit"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: "Install Rust toolchain"
# run: rustup show
# - uses: Swatinem/rust-cache@v2
# - name: "Install pre-commit"
# run: pip install pre-commit
# - name: "Cache pre-commit"
# uses: actions/cache@v3
# with:
# path: ~/.cache/pre-commit
# key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
# - name: "Run pre-commit"
# run: |
# echo '```console' > $GITHUB_STEP_SUMMARY
# # Enable color output for pre-commit and remove it for the summary
# SKIP=cargo-fmt,clippy,dev-generate-all pre-commit run --all-files --show-diff-on-failure --color=always | \
# tee >(sed -E 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[mGK]//g' >> $GITHUB_STEP_SUMMARY) >&1
# exit_code=${PIPESTATUS[0]}
# echo '```' >> $GITHUB_STEP_SUMMARY
# exit $exit_code
docs:
name: "mkdocs"
runs-on: ubuntu-latest
env:
MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: "Add SSH key"
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
- name: "Install Rust toolchain"
run: rustup show
- uses: Swatinem/rust-cache@v2
- name: "Install Insiders dependencies"
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
run: pip install -r docs/requirements-insiders.txt
- name: "Install dependencies"
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
run: pip install -r docs/requirements.txt
- name: "Update README File"
run: python scripts/transform_readme.py --target mkdocs
- name: "Generate docs"
run: python scripts/generate_mkdocs.py
- name: "Check docs formatting"
run: python scripts/check_docs_formatted.py
- name: "Build Insiders docs"
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
run: mkdocs build --strict -f mkdocs.insiders.yml
- name: "Build docs"
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
run: mkdocs build --strict -f mkdocs.generated.yml
# docs:
# name: "mkdocs"
# runs-on: ubuntu-latest
# env:
# MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# - name: "Add SSH key"
# if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
# uses: webfactory/ssh-agent@v0.8.0
# with:
# ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
# - name: "Install Rust toolchain"
# run: rustup show
# - uses: Swatinem/rust-cache@v2
# - name: "Install Insiders dependencies"
# if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
# run: pip install -r docs/requirements-insiders.txt
# - name: "Install dependencies"
# if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
# run: pip install -r docs/requirements.txt
# - name: "Update README File"
# run: python scripts/transform_readme.py --target mkdocs
# - name: "Generate docs"
# run: python scripts/generate_mkdocs.py
# - name: "Check docs formatting"
# run: python scripts/check_docs_formatted.py
# - name: "Build Insiders docs"
# if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
# run: mkdocs build --strict -f mkdocs.insiders.yml
# - name: "Build docs"
# if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
# run: mkdocs build --strict -f mkdocs.generated.yml
check-formatter-ecosystem:
name: "Formatter ecosystem and progress checks"
runs-on: ubuntu-latest
needs: determine_changes
if: needs.determine_changes.outputs.formatter == 'true' || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: rustup show
- name: "Cache rust"
uses: Swatinem/rust-cache@v2
- name: "Formatter progress"
run: scripts/formatter_ecosystem_checks.sh
- name: "Github step summary"
run: cat target/progress_projects_stats.txt > $GITHUB_STEP_SUMMARY
- name: "Remove checkouts from cache"
run: rm -r target/progress_projects
# check-formatter-ecosystem:
# name: "Formatter ecosystem and progress checks"
# runs-on: ubuntu-latest
# needs: determine_changes
# if: needs.determine_changes.outputs.formatter == 'true' || github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v4
# - name: "Install Rust toolchain"
# run: rustup show
# - name: "Cache rust"
# uses: Swatinem/rust-cache@v2
# - name: "Formatter progress"
# run: scripts/formatter_ecosystem_checks.sh
# - name: "Github step summary"
# run: cat target/progress_projects_stats.txt > $GITHUB_STEP_SUMMARY
# - name: "Remove checkouts from cache"
# run: rm -r target/progress_projects
# check-ruff-lsp:
# name: "test ruff-lsp"