-
Notifications
You must be signed in to change notification settings - Fork 249
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
1,778 changed files
with
117,364 additions
and
0 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,7 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,59 @@ | ||
name: 🚦 CLI Tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
id-token: write | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
[ubuntu-latest-16-cores, macos-latest-xlarge, windows-latest-16-cores] | ||
name: 🚦 Test | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- run: git config --global core.autocrlf false | ||
|
||
- name: ⬇️ Checkout qlty | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🦀 Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Setup PHP with PECL extension | ||
uses: shivammathur/setup-php@v2 | ||
if: matrix.os == 'macos-latest-xlarge' | ||
|
||
- name: 🫙 Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: 🚦 Run Test | ||
run: cargo llvm-cov --lcov --output-path target/lcov.info -- --include-ignored | ||
|
||
- uses: qltysh/qlty-action/coverage@main | ||
with: | ||
coverage-token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | ||
files: target/lcov.info | ||
tag: cli | ||
skip-errors: true |
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,113 @@ | ||
name: "🦀 Integration Tests" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "**/ruby.rs" | ||
- "**/ruby/**/*.rs" | ||
- .github/workflows/cli_integration.yml | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "**/ruby.rs" | ||
- "**/ruby/**/*.rs" | ||
- .github/workflows/cli_integration.yml | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
id-token: write | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
name: 🏗️ Build Release CLI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout cloud | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🦀 Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: 🫙 Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: 🏗️ Build Release CLI | ||
run: cargo build --release | ||
|
||
- name: 📦 Archive CLI | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qlty | ||
path: target/release/qlty | ||
|
||
test_ruby_binary_install: | ||
name: "🧪 Test: Ruby Binary Install" | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
container: [ | ||
"ubuntu:24.04", | ||
"redhat/ubi9", | ||
"debian:trixie-slim", | ||
"debian:bookworm-slim", | ||
# unsupported: | ||
# "ubuntu:20.04", | ||
# "redhat/ubi8", | ||
] | ||
include: | ||
- container: ubuntu:24.04 | ||
package_install: apt-get update && apt-get install -y git curl libyaml-dev libgmp-dev build-essential | ||
- container: debian:trixie-slim | ||
package_install: apt-get update && apt-get install -y git curl libyaml-dev libgmp-dev build-essential | ||
- container: debian:bookworm-slim | ||
package_install: apt-get update && apt-get install -y git curl libyaml-dev libgmp-dev build-essential | ||
- container: redhat/ubi9 | ||
package_install: yum install -y git gcc make libyaml-devel gmp-devel | ||
# unsupported: | ||
# - container: ubuntu:20.04 | ||
# package_install: apt-get update && apt-get install -y git curl libyaml-dev libgmp-dev build-essential | ||
# - container: redhat/ubi8 | ||
# package_install: yum install -y git gcc make libyaml-devel gmp-devel | ||
container: | ||
image: ${{ matrix.container }} | ||
env: | ||
QLTY_LOG: debug | ||
QLTY_LOG_STDERR: 1 | ||
|
||
steps: | ||
- run: ${{ matrix.package_install }} | ||
|
||
- name: ⚙️ Setup Repository | ||
run: | | ||
mkdir repo | ||
cd repo | ||
echo 'CONST = 1' > main.rb | ||
git init . | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Test User" | ||
git add . | ||
git commit -m "Initial commit" | ||
- name: 📦 Download CLI | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: qlty | ||
path: ${{ github.workspace }}/bin | ||
|
||
- name: "🚦 Run Test" | ||
run: | | ||
export PATH=$GITHUB_WORKSPACE/bin:$PATH | ||
chmod +x $GITHUB_WORKSPACE/bin/qlty | ||
qlty init -n | ||
qlty plugins enable standardrb | ||
qlty check --all --no-cache --no-progress --filter=standardrb | ||
working-directory: repo |
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,93 @@ | ||
name: 🚦 Plugin Tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
id-token: write | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
test: | ||
if: github.actor != 'dependabot[bot]' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
[macos-latest-xlarge, ubuntu-latest-16-cores, windows-latest-16-cores] | ||
name: Plugins test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 📦 Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: "npm" | ||
cache-dependency-path: plugins/package-lock.json | ||
|
||
# Generate Cache key for Linux/macOS | ||
- name: 🔒 Set CACHE_MONTH on Linux/macOS | ||
run: echo "CACHE_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV | ||
|
||
- name: 💾 Cache qlty tools | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.qlty | ||
key: ${{ runner.os }}-qlty-${{ env.CACHE_MONTH }} | ||
|
||
- name: 📦 Setup PHP with PECL extension | ||
uses: shivammathur/setup-php@v2 | ||
if: matrix.os == 'macos-latest-xlarge' | ||
|
||
- name: 📦 Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.3.0 | ||
if: matrix.os == 'windows-latest-16-cores' | ||
|
||
- name: 🦀 Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: 🫙 Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: ⚙️ cargo build | ||
run: cargo build | ||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
- name: Move qlty into PATH | ||
run: echo "${{ github.workspace }}/target/debug" >> $GITHUB_PATH | ||
|
||
- name: 🔍 Check qlty version | ||
run: qlty --version | ||
|
||
# Login to the GitHub Container Registry to reduce trivy rate limiting errors | ||
- name: Log in to registry | ||
# macOS does not support Docker | ||
if: matrix.os != 'macos-latest-xlarge' | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Run plugins tests | ||
working-directory: plugins | ||
run: | | ||
npm ci | ||
npm test |
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,4 @@ | ||
target/* | ||
!/target/doc | ||
flamegraph.svg | ||
.env |
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,4 @@ | ||
results | ||
logs | ||
out | ||
sources |
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,3 @@ | ||
# Autoformatter friendly flake8 config (all formatting rules disabled) | ||
[flake8] | ||
extend-ignore = D1, D2, E1, E2, E3, E501, W1, W2, W3, W5 |
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,2 @@ | ||
ignored: | ||
- DL3008 |
Oops, something went wrong.