diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000..af85378 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,38 @@ +name: Integration Tests + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + integration-tests: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' + cache: 'pip' + cache-dependency-path: eks_automation/requirements.txt + + - name: Install dependencies + run: | + cd eks_automation + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run integration tests + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_API: "https://api.github.com" # Can be overridden with vars if needed + GITHUB_ORG: ${{ github.repository_owner }} + run: | + cd eks_automation + python -m pytest tests/ -v -m integration \ No newline at end of file diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..7592d02 --- /dev/null +++ b/variables.tf @@ -0,0 +1,29 @@ +variable "github_api" { + description = "URL for the GitHub Enterprise API" + type = string + default = "https://github.enterprise.example.com/api/v3" +} + +variable "github_org_name" { + description = "GitHub organization name" + type = string + default = "your-org" +} + +variable "github_token_secret_name" { + description = "AWS SSM parameter name for the GitHub token" + type = string + default = "/github/token" +} + +variable "template_repo_name" { + description = "GitHub repository name for the EKS template" + type = string + default = "template-eks-cluster" +} + +variable "template_file_name" { + description = "Template file name for the EKS configuration" + type = string + default = "eks.hcl.j2" +} \ No newline at end of file