-
Notifications
You must be signed in to change notification settings - Fork 249
105 lines (90 loc) · 2.39 KB
/
plugins.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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:
# macos-latest-xlarge currently points to MacOS 14 Sonoma
# macos-15-xlarge points to MacOS 15 Sequoia
os:
[
macos-latest-xlarge,
macos-15-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
env:
QLTY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: contains(matrix.os, 'macos')
- 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-rust-lang/setup-rust-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
- name: Run plugins tests
working-directory: plugins
run: |
npm ci
npm test