abril/.github/workflows/lint.yml
Techno Tim a840571733
feat(ci): switching to self-hosted runners (#133)
* feat(ci): switching to self-hosted runners

* feat(gh-actions-controller): added

* feat(gh-actions-controller): added
2022-10-31 17:56:22 -05:00

39 lines
1.0 KiB
YAML

---
name: Linting
on:
pull_request:
push:
branches:
- master
jobs:
pre-commit-ci:
name: Pre-Commit
runs-on: [self-hosted, Linux, x64]
steps:
- name: Check out the codebase
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
- name: Set up Python 3.x
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 #4.0.2
with:
python-version: "3.x"
- name: Install dependencies
run: |
echo "::group::Upgrade pip"
python3 -m pip install --upgrade pip
echo "::endgroup::"
echo "::group::Install Python requirements from requirements.txt"
python3 -m pip install -r requirements.txt
echo "::endgroup::"
echo "::group::Install Ansible role requirements from collections/requirements.yml"
ansible-galaxy install -r collections/requirements.yml
echo "::endgroup::"
- name: Run pre-commit
uses: pre-commit/action@v3.0.0