Skip to content

Commit

Permalink
Clean up workflow names (steps / jobs)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Nov 18, 2024
1 parent d4152bb commit 353f6ea
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
matrix:
os:
[ubuntu-latest-16-cores, macos-latest-xlarge, windows-latest-16-cores]
name: 🚦 Test
name: "Unit Test: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

steps:
- name: 🛑 Cancel Previous Runs
- name: Cancel Previous Runs
uses: styfle/[email protected]

- run: git config --global core.autocrlf false

- name: ⬇️ Checkout qlty
- name: Checkout qlty
uses: actions/checkout@v4

- name: 🦀 Install Rust toolchain
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -45,10 +45,10 @@ jobs:
uses: shivammathur/setup-php@v2
if: matrix.os == 'macos-latest-xlarge'

- name: 🫙 Cache Rust
- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: 🚦 Run Test
- name: Run Test
run: cargo llvm-cov --lcov --output-path target/lcov.info -- --include-ignored

- uses: qltysh/qlty-action/coverage@main
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/cli_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@ env:

jobs:
build:
name: 🏗️ Build Release CLI
name: Build Release CLI
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout cloud
- name: Checkout cloud
uses: actions/checkout@v4

- name: 🦀 Install Rust toolchain
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: 🫙 Cache Rust
- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: 🏗️ Build Release CLI
- name: Build Release CLI
run: cargo build --release

- name: 📦 Archive CLI
- name: Archive CLI
uses: actions/upload-artifact@v4
with:
name: qlty
Expand Down Expand Up @@ -97,13 +97,13 @@ jobs:
git add .
git commit -m "Initial commit"
- name: 📦 Download CLI
- name: Download CLI
uses: actions/download-artifact@v4
with:
name: qlty
path: ${{ github.workspace }}/bin

- name: "🚦 Run Test"
- name: Run Test
run: |
export PATH=$GITHUB_WORKSPACE/bin:$PATH
chmod +x $GITHUB_WORKSPACE/bin/qlty
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,62 +22,61 @@ jobs:
matrix:
os:
[macos-latest-xlarge, ubuntu-latest-16-cores, windows-latest-16-cores]
name: Plugins test on ${{ matrix.os }}
name: "Plugins test: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- name: 🛑 Cancel Previous Runs
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
- name: Checkout repo
uses: actions/checkout@v4

- name: 📦 Use Node.js
- 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
- name: Generate cache key
run: echo "CACHE_MONTH=$(date +'%Y-%m')" >> $GITHUB_ENV

- name: 💾 Cache qlty tools
- name: Cache qlty tools
uses: actions/cache@v3
with:
path: ~/.qlty
key: ${{ runner.os }}-qlty-${{ env.CACHE_MONTH }}

- name: 📦 Setup PHP with PECL extension
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
if: matrix.os == 'macos-latest-xlarge'

- name: 📦 Setup Ruby
- 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
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: 🫙 Cache Rust
- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: ⚙️ cargo build
- 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
- name: Check qlty version
run: qlty --version

# Login to the GitHub Container Registry to reduce trivy rate limiting errors
Expand Down

0 comments on commit 353f6ea

Please sign in to comment.