-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.1 KB
/
lint.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
# SPDX-License-Identifier: ISC
#
# Copyright (c) 2024 Johnathan C. Maudlin <[email protected]>
---
name: lint
on:
pull_request:
branches: ["**"]
paths-ignore: ["**.md"]
push:
branches: ["**"]
paths-ignore: ["**.md"]
workflow_dispatch:
jobs:
lint:
name: ${{ matrix.linter }}-${{ matrix.python }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
linter: [ansible-lint, mypy, ruff]
os: [ubuntu-latest]
python: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: tox.ini
- name: Setup Tox cache
uses: actions/cache@v4
id: tox
with:
key: tox-${{ matrix.linter }}-${{ matrix.python }}-${{ matrix.os }}-${{ hashFiles('tox.ini') }}
path: .tox/${{ matrix.linter }}
- name: Install Tox
run: pip install tox
- name: Run ${{ matrix.linter }}
run: tox -e ${{ matrix.linter }}