endpoint for getting all transactions now with name instead of slug #24
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
name: Test and Deploy to Heroku | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo:latest | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: password | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Configure Poetry | |
run: | | |
poetry config virtualenvs.create false | |
poetry config virtualenvs.in-project true | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests | |
run: MONGO_URL=mongodb://root:password@localhost:27017 poetry run make test | |
- name: Build the Docker image | |
run: make build | |
env: | |
BUILD_SHA: ${{ github.sha }} | |
- name: Log in to Heroku Container Registry | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:login | |
- name: Push Docker image to Heroku | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: | | |
docker images | |
docker tag prompt_sail_app:latest registry.heroku.com/promptsail/web | |
docker push registry.heroku.com/promptsail/web | |
- name: Release to Heroku | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:release web -a promptsail | |