Added Sales and Support call counter #744
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
pull_request: {} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: hermes_test | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: --entrypoint redis-server | |
env: | |
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/hermes_test' | |
LOGFIRE_SEND_TO_LOGFIRE: 'false' | |
TESTING: 'true' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: install dependencies | |
run: | | |
make install | |
pip freeze | |
- name: lint | |
run: make lint | |
- name: test | |
run: make test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
deploy: | |
needs: | |
- test | |
if: "success() && startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
HEROKU_APP: tc-hermes | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --unshallow | |
- run: git switch main | |
- run: git remote add heroku https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP.git | |
- run: git push heroku main |