From ca70afbd51c9bc70cf202fbc9a3b990d5e0edf3b Mon Sep 17 00:00:00 2001 From: Daniel Akulenok Date: Wed, 28 Jan 2026 23:11:04 +0100 Subject: [PATCH] ci: add simplified Gitea Actions workflow for testing - Add yamllint for YAML style validation (relaxed profile) - Add ansible-lint for Ansible best practices (production profile) - Add Molecule test job that runs only on pull requests - Lint job runs on all push events to main and feature branches - Test job depends on lint job passing - Clean, maintainable pipeline configuration --- .gitea/workflows/test.yaml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..3e707ad --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,58 @@ +--- +name: Test + +on: + push: + branches: + - main + - feature/** + pull_request: + branches: + - main + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install tools + run: | + pip install --no-cache-dir yamllint ansible-lint + + - name: Run yamllint + run: yamllint -d relaxed . + + - name: Run ansible-lint + run: ansible-lint --strict --profile=production + + test: + name: Test + runs-on: ubuntu-latest + needs: lint + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + pip install --no-cache-dir \ + ansible \ + molecule[podman] \ + podman-compose \ + pyyaml \ + jinja2 + + - name: Run Molecule tests + run: molecule test