Skip to content
Merged
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
8 changes: 2 additions & 6 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'samconfig.toml'
- 'pyproject.toml'
- 'poetry.lock'
- 'requirements.txt'
- 'Makefile'
- '.github/workflows/web.yml'
pull_request:
paths:
Expand All @@ -17,7 +17,7 @@ on:
- 'samconfig.toml'
- 'pyproject.toml'
- 'poetry.lock'
- 'requirements.txt'
- 'Makefile'
- '.github/workflows/web.yml'
jobs:
check:
Expand All @@ -28,10 +28,6 @@ jobs:
with:
python-version: '3.12'
- run: pip install poetry poetry-plugin-export
- name: Check requirements.txt is current
run: |
poetry export --extras web --output requirements.txt.check
diff requirements.txt requirements.txt.check
- uses: aws-actions/setup-sam@d78e1a4a9656d3b223e59b80676a797f20093133 # v2
- run: sam validate --lint
- run: sam build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.requirements/
.aws-sam/
packaged.yaml
requirements.txt
__pycache__/
htmlcov/
tagbot.egg-info/
Expand Down
3 changes: 1 addition & 2 deletions DEVGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ sam build && sam deploy \
|------|---------|
| `template.yaml` | SAM template: Lambda functions, API Gateway, IAM |
| `samconfig.toml` | Deploy config per environment |
| `requirements.txt` | Python deps for Lambda (keep in sync with pyproject.toml) |

**Parameters** (in template.yaml, pass via `--parameter-overrides`):
- `GithubTokenParam` - SSM parameter name for the GitHub token (default: `/tagbot/github-token`)
Expand All @@ -135,7 +134,7 @@ The GitHub token is stored in SSM Parameter Store as a SecureString at `/tagbot/

### Troubleshooting

**Missing Python modules**: Check `requirements.txt`, try `rm -rf .aws-sam/`
**Missing Python modules**: Check `poetry.lock`, try `rm -rf .aws-sam/`

**Build issues**: `sam build --use-container` to build in a Docker container matching the Lambda runtime

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.PHONY: test test-docker publish pytest black flake8 mypy
.PHONY: test test-docker publish pytest black flake8 mypy build-ApiFunction build-ReportsFunction

build-ApiFunction build-ReportsFunction:
poetry export --extras web --without-hashes --output requirements.txt
pip install -r requirements.txt -t $(ARTIFACTS_DIR)/
cp -r tagbot $(ARTIFACTS_DIR)/

test:
./bin/test.sh
Expand Down
Loading
Loading