-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from miztch/gorillamux
refactor: rewrite with Go
- Loading branch information
Showing
27 changed files
with
568 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,20 +10,24 @@ on: | |
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
environment: production | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21.x" | ||
- name: Setup AWS SAM CLI | ||
uses: aws-actions/setup-sam@v2 | ||
with: | ||
use-installer: true | ||
- name: Setup AWS Credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
|
@@ -35,10 +39,10 @@ jobs: | |
SASHA_TABLE_NAME=` \ | ||
aws cloudformation describe-stacks --stack-name sasha \ | ||
| jq -r '.Stacks[].Outputs[] | select(.OutputKey == "VlrMatchesTableName" ) | .OutputValue'` | ||
echo "SASHA_TABLE_NAME=$SASHA_TABLE_NAME" >> $GITHUB_ENV | ||
echo "SASHA_TABLE_NAME=$SASHA_TABLE_NAME" >> $GITHUB_ENV | ||
- name: Prepare SAM parameters | ||
env: | ||
SAM_DEPLOY_STAGE: ${{ vars.SAM_DEPLOY_STAGE }} | ||
APPLICATION_NAME: ${{ env.APPLICATION_NAME }} | ||
SASHA_TABLE_NAME: ${{ env.SASHA_TABLE_NAME }} | ||
API_DOMAIN_NAME: ${{ secrets.API_DOMAIN_NAME }} | ||
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }} | ||
|
@@ -47,7 +51,7 @@ jobs: | |
run: | | ||
tee params.json << EOF | ||
{ | ||
"SAMDeployStage": "${SAM_DEPLOY_STAGE}", | ||
"ApplicationName": "${APPLICATION_NAME}", | ||
"SashaTableName": "${SASHA_TABLE_NAME}", | ||
"APIDomainName": "${API_DOMAIN_NAME}", | ||
"CertificateArn": "${CERTIFICATE_ARN}", | ||
|
@@ -56,7 +60,7 @@ jobs: | |
} | ||
EOF | ||
- name: Build SAM packages | ||
run: sam build --use-container | ||
run: sam build | ||
- name: Deploy SAM application | ||
env: | ||
BUCKET_NAME: ${{ secrets.PROVISIONING_BUCKET_NAME }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,32 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# pyenv | ||
.python-version | ||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
# Go workspace file | ||
go.work | ||
go.work.sum | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
# env file | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# aws-chalice | ||
api/.chalice/deployed | ||
api/.chalice/deployments | ||
api/.chalice/config.json | ||
|
||
# aws-sam | ||
.aws-sam | ||
samconfig.toml | ||
|
||
# Local binary file | ||
dima |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.DEFAULT_GOAL := build | ||
|
||
fmt: | ||
go fmt | ||
.PHONY: fmt | ||
|
||
lint: fmt | ||
staticcheck | ||
.PHONY: lint | ||
|
||
vet: lint | ||
go vet | ||
.PHONY: vet | ||
|
||
build: vet | ||
go mod tidy | ||
CGO_ENABLED=0 go build | ||
.PHONY: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.