From bf7c7c956299dc724653d5ac125c4276eb8a21d5 Mon Sep 17 00:00:00 2001 From: Tuan-Dat Tran Date: Wed, 25 Feb 2026 06:00:20 +0100 Subject: [PATCH] ci: add GitHub Actions workflow for linting --- .github/workflows/ci.yaml | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..778e87a --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ansible-lint==6.22.2 ansible-core==2.15.8 + + - name: Install Ansible collections + run: ansible-galaxy collection install -r requirements.yaml + + - name: Run ansible-lint + run: ansible-lint + + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files