updated github app_workflow #2
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: App workflow | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PYTHON_VERSION: 3.11 | |
jobs: | |
app_workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python${{ env.PYTHON_VERSION }} - && \ | |
$HOME/.local/bin/poetry config virtualenvs.in-project true && \ | |
$HOME/.local/bin/poetry config virtualenvs.options.always-copy true && \ | |
$HOME/.local/bin/poetry config virtualenvs.path "venv" | |
- name: Install project dependencies | |
run: | | |
$HOME/.local/bin/poetry install | |
- name: Run unittests | |
run: | | |
. .venv/bin/activate && \ | |
python -m unittest discover --start-directory './console' --pattern 'test_*.py' --verbose | |
- name: Deploy app | |
run: | | |
deployment_trigger_api_response=$(curl -s "${{ secrets.RENDER_PLATFORM_DEPLOY_HOOK }}") && \ | |
echo "Deployment trigger API response: $deployment_trigger_api_response" |