Skip to content

Support biome suggestions #149

Support biome suggestions

Support biome suggestions #149

Workflow file for this run

name: Plugin Tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "plugins/**"
- "qlty-*/**"
- "Cargo.*"
- ".github/workflows/plugins.yml"
pull_request:
paths:
- "plugins/**"
- "qlty-*/**"
- "Cargo.*"
- ".github/workflows/plugins.yml"
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: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}
cancel-in-progress: true
defaults:
run:
shell: bash
steps:
- 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
- name: Generate cache key
run: echo "CACHE_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV
- name: Cache qlty tools
uses: actions/cache@v4
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 -- --testPathIgnorePatterns=trivy