mirror of https://github.com/astral-sh/ruff
ci: add dependabot integration for GitHub Actions (#3504)
This commit is contained in:
parent
d5700d7c69
commit
78c2b0ac47
|
|
@ -0,0 +1,11 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
time: "12:00"
|
||||||
|
timezone: "America/New_York"
|
||||||
|
commit-message:
|
||||||
|
prefix: "ci(deps)"
|
||||||
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
- name: "Install Rust toolchain"
|
- name: "Install Rust toolchain"
|
||||||
run: |
|
run: |
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
cargo-clippy-wasm:
|
cargo-clippy-wasm:
|
||||||
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
rustup target add wasm32-unknown-unknown
|
rustup target add wasm32-unknown-unknown
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings
|
- run: cargo clippy -p ruff_wasm --target wasm32-unknown-unknown --all-features -- -D warnings
|
||||||
|
|
||||||
cargo-test:
|
cargo-test:
|
||||||
|
|
@ -59,9 +59,9 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: "Install Rust toolchain"
|
- name: "Install Rust toolchain"
|
||||||
run: rustup show
|
run: rustup show
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo install cargo-insta
|
- run: cargo install cargo-insta
|
||||||
- run: pip install black[d]==22.12.0
|
- run: pip install black[d]==23.1.0
|
||||||
- name: "Run tests (Ubuntu)"
|
- name: "Run tests (Ubuntu)"
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -98,7 +98,7 @@ jobs:
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
cache-dependency-path: playground/package-lock.json
|
cache-dependency-path: playground/package-lock.json
|
||||||
- uses: jetli/wasm-pack-action@v0.4.0
|
- uses: jetli/wasm-pack-action@v0.4.0
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: "Run wasm-pack"
|
- name: "Run wasm-pack"
|
||||||
run: |
|
run: |
|
||||||
cd crates/ruff_wasm
|
cd crates/ruff_wasm
|
||||||
|
|
@ -111,7 +111,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: "Install Rust toolchain"
|
- name: "Install Rust toolchain"
|
||||||
run: rustup show
|
run: rustup show
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: ./scripts/add_rule.py --name DoTheThing --code PLC999 --linter pylint
|
- run: ./scripts/add_rule.py --name DoTheThing --code PLC999 --linter pylint
|
||||||
- run: cargo check
|
- run: cargo check
|
||||||
- run: |
|
- run: |
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
- name: "Install Rust toolchain"
|
- name: "Install Rust toolchain"
|
||||||
run: rustup show
|
run: rustup show
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
run: |
|
run: |
|
||||||
pip install -r docs/requirements.txt
|
pip install -r docs/requirements.txt
|
||||||
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
mkdocs build --strict
|
mkdocs build --strict
|
||||||
- name: "Deploy to Cloudflare Pages"
|
- name: "Deploy to Cloudflare Pages"
|
||||||
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
||||||
uses: cloudflare/wrangler-action@2.0.0
|
uses: cloudflare/wrangler-action@2
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
manylinux: auto
|
manylinux: auto
|
||||||
args: --no-default-features --release --out dist -m ./${{ env.CRATE_NAME }}/Cargo.toml
|
args: --no-default-features --release --out dist -m ./${{ env.CRATE_NAME }}/Cargo.toml
|
||||||
- uses: uraimo/run-on-arch-action@v2.5.0
|
- uses: uraimo/run-on-arch-action@v2
|
||||||
if: matrix.target != 'ppc64'
|
if: matrix.target != 'ppc64'
|
||||||
name: Install built wheel
|
name: Install built wheel
|
||||||
with:
|
with:
|
||||||
|
|
@ -206,7 +206,7 @@ jobs:
|
||||||
target: ${{ matrix.platform.target }}
|
target: ${{ matrix.platform.target }}
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
args: --release --out dist -m ./${{ env.CRATE_NAME }}/Cargo.toml
|
args: --release --out dist -m ./${{ env.CRATE_NAME }}/Cargo.toml
|
||||||
- uses: uraimo/run-on-arch-action@master
|
- uses: uraimo/run-on-arch-action@v2
|
||||||
name: Install built wheel
|
name: Install built wheel
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.platform.arch }}
|
arch: ${{ matrix.platform.arch }}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
working-directory: playground
|
working-directory: playground
|
||||||
- name: "Deploy to Cloudflare Pages"
|
- name: "Deploy to Cloudflare Pages"
|
||||||
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }}
|
||||||
uses: cloudflare/wrangler-action@2.0.0
|
uses: cloudflare/wrangler-action@2
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
accountId: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ jobs:
|
||||||
target: ${{ matrix.platform.target }}
|
target: ${{ matrix.platform.target }}
|
||||||
manylinux: auto
|
manylinux: auto
|
||||||
args: --release --out dist
|
args: --release --out dist
|
||||||
- uses: uraimo/run-on-arch-action@v2.5.0
|
- uses: uraimo/run-on-arch-action@v2
|
||||||
if: matrix.platform.arch != 'ppc64'
|
if: matrix.platform.arch != 'ppc64'
|
||||||
name: Install built wheel
|
name: Install built wheel
|
||||||
with:
|
with:
|
||||||
|
|
@ -309,7 +309,7 @@ jobs:
|
||||||
target: ${{ matrix.platform.target }}
|
target: ${{ matrix.platform.target }}
|
||||||
manylinux: musllinux_1_2
|
manylinux: musllinux_1_2
|
||||||
args: --release --out dist
|
args: --release --out dist
|
||||||
- uses: uraimo/run-on-arch-action@master
|
- uses: uraimo/run-on-arch-action@v2
|
||||||
name: Install built wheel
|
name: Install built wheel
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.platform.arch }}
|
arch: ${{ matrix.platform.arch }}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
fail_fast: true
|
fail_fast: true
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/abravalheri/validate-pyproject
|
- repo: https://github.com/abravalheri/validate-pyproject
|
||||||
rev: v0.10.1
|
rev: v0.12.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: validate-pyproject
|
- id: validate-pyproject
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue