Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: ['*']
pull_request:
branches: [master]

jobs:
lint-format-test:
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 Poetry
run: curl -sSL https://install.python-poetry.org | python3 -

- name: Configure Poetry Path
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Dependencies
run: poetry install --with dev

- name: Check Code Format (black)
run: poetry run black --check tfworker tests

- name: Check Imports Sorted (isort)
run: poetry run isort --check-only tfworker tests

- name: Run Lint (flake8)
run: poetry run flake8 --ignore E501,W503 tfworker tests

- name: Run Tests
run: poetry run pytest -p no:warnings --disable-socket
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[settings]
known_third_party = atlassian,boto3,botocore,click,google,hcl2,jinja2,lark,moto,packaging,pydantic,pydantic_core,pydantic_settings,pytest,tfworker,yaml
known_third_party = atlassian,boto3,botocore,click,google,hcl2,jinja2,lark,moto,packaging,pydantic,pydantic_core,pydantic_settings,pytest,yaml
profile = black
skip = ["*/__init__.py"]
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ clean:
@rm -rf build dist .eggs terraform_worker.egg-info
@find . -name *.pyc -exec rm {} \;
@find . -name __pycache__ -type d -exec rmdir {} \;

triage-export:
@echo "📥 Exporting open, untriaged issues for AI review..."
gh issue list --repo ephur/terraform-worker --state open --limit 1000 --json number,title,body,labels | \
jq '[.[] | select(.labels | all(.name != "triaged"))]' > open_issues.json
@echo "✅ Issues written to open_issues.json"

triage-preview:
@echo "🔍 Previewing untriaged issue titles..."
@if [ ! -f open_issues.json ]; then \
$(MAKE) triage-export; \
fi
jq -r '.[] | "\(.number): \(.title)"' open_issues.json

ready: lint format test
@echo "✅ All checks passed. You are ready to commit or push."
Loading