From 72b59d9d615d37cc0493c71a266407d5ab25f7bb Mon Sep 17 00:00:00 2001 From: Santiago Suarez Date: Fri, 19 Jul 2024 11:41:56 -0300 Subject: [PATCH] Add cd workflow --- .github/workflows/cd.yml | 41 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3029e4f..eb24eb5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,7 +1,44 @@ name: 'Continuous Delivery' on: - ... +on: + pull_request: + branches: + - develop + paths: + - 'challenge/**' + - 'scripts/**' + - '.github/**' + - 'pyproject.toml' + - 'poetry.lock' jobs: - ... \ No newline at end of file +jobs: + run_testing: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check directory + run: | + ls + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10.8' + - name: Python version + run: | + python --version + - name: Install poetry and virtualenv + run: | + pip install poetry + - name: Install dependencies + run: | + poetry config virtualenvs.create false + poetry lock --no-update + poetry install + - name: Push to prod + run: | + bash scripts/deploy.sh + - name: Run stress test + run: | + make stress-test \ No newline at end of file