Seth McKnight Copilot commited on
Commit
9c1cf16
·
1 Parent(s): c4b28eb

Setup ci cd (#5)

Browse files

* Add CI/CD workflow and Dockerfile for application deployment

* Update Dockerfile

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: add .dockerignore, run.sh; tighten Dockerfile; address PR review comments

* chore: bind gunicorn to PORT env var for Render compatibility

* ci: add deploy-to-render job (triggers Render deploy and runs smoke test)

* chore: add render.yaml and create post-deploy PR step to update deployed.md

* ci: skip deploy on [skip-deploy] commits; add exponential backoff to deploy poll; mark post-deploy commit to skip deploy

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: use BACKOFF_STEP and BACKOFF_MAX variables in deploy polling loop

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: expand README with CI/CD and Render deployment instructions

* ci: add black, isort, flake8 checks to build-and-test job

* style: run black/isort on project files; make flake8 strict in CI (exclude venv)

* chore: add pre-commit config (black, isort, flake8, basic hooks)

* chore: make black pre-commit hook use default interpreter (no language_version)

* chore: run pre-commit --all-files (apply EOF fixer)

* ci: run pre-commit in CI (install and run hooks)

* chore: add dev-requirements, PR-only pre-commit CI job, and README pre-commit docs

* ci: run pre-commit on push+PR and make build depend on it

* docs: mark CI actions implemented in project plan; add CI optimizations

* Update CI configuration for PRs and main deploys (#3)

* ci: ensure pre-commit runs only on PRs and don't block main push deploys

* ci: run deploy on pushes to main or merged PRs (respect skip-deploy)

* ci: update pre-commit checks to run on changed files in PRs only

* ci: remove dependency on pre-commit-check job and update pip cache key pattern

* ci: fix malformed workflow YAML (restore minimal CI)

* ci: restore full workflow (pre-commit PR, build-and-test, deploy-to-render)

* ci: update Python version setup and improve pip installation in workflows

* chore: add gunicorn to runtime requirements

* ci: harden deploy wait & smoke-test loops with defaults

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: trigger workflows

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Enhance CI workflows and add gunicorn to requirements (#4)

* ci: ensure pre-commit runs only on PRs and don't block main push deploys

* ci: run deploy on pushes to main or merged PRs (respect skip-deploy)

* ci: update pre-commit checks to run on changed files in PRs only

* ci: remove dependency on pre-commit-check job and update pip cache key pattern

* ci: fix malformed workflow YAML (restore minimal CI)

* ci: restore full workflow (pre-commit PR, build-and-test, deploy-to-render)

* ci: update Python version setup and improve pip installation in workflows

* chore: add gunicorn to runtime requirements

* ci: harden deploy wait & smoke-test loops with defaults

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/main.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: trigger workflows

* ci: trigger workflows

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Files changed (2) hide show
  1. .github/workflows/main.yml +32 -0
  2. requirements.txt +1 -0
.github/workflows/main.yml CHANGED
@@ -7,7 +7,39 @@ on:
7
  branches: [main]
8
 
9
  jobs:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  build-and-test:
 
11
  runs-on: ubuntu-latest
12
  env:
13
  PYTHONPATH: ${{ github.workspace }}
 
7
  branches: [main]
8
 
9
  jobs:
10
+ pre-commit-check:
11
+ name: Pre-commit checks (PR only)
12
+ runs-on: ubuntu-latest
13
+ if: github.event_name == 'pull_request'
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ - name: Cache pip (dev)
18
+ uses: actions/cache@v4
19
+ with:
20
+ path: ~/.cache/pip
21
+ key: ${{ runner.os }}-pip-dev-${{ hashFiles('dev-requirements.txt') }}
22
+ restore-keys: |
23
+ ${{ runner.os }}-pip-dev-
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.10"
28
+ - name: Install dev dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ if [ -f dev-requirements.txt ]; then
32
+ pip install -r dev-requirements.txt
33
+ fi
34
+ - name: Fetch origin/main for pre-commit diff
35
+ run: git fetch origin main
36
+ - name: Run pre-commit (PR changed files)
37
+ run: |
38
+ TO_REF="${{ github.event.pull_request.head.sha }}"
39
+ pre-commit run --from-ref origin/main --to-ref $TO_REF --show-diff-on-failure
40
+
41
  build-and-test:
42
+ name: Build and test
43
  runs-on: ubuntu-latest
44
  env:
45
  PYTHONPATH: ${{ github.workspace }}
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  Flask
2
  pytest
 
 
1
  Flask
2
  pytest
3
+ gunicorn