From 5dfa36564a4909ec0b0cdd0b2bccf670fb307cb0 Mon Sep 17 00:00:00 2001 From: Sigurd <sigurd1994@hotmail.com> Date: Thu, 17 Feb 2022 14:55:34 +0100 Subject: [PATCH] test --- .github/workflows/main.yml | 50 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0c882e..0a25a87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,32 +1,30 @@ name: Main -on: [push] +on: + push: + branches: + - master jobs: - build: - + test: + name: test runs-on: ubuntu-latest + container: python:3.8 + defaults: + run: + shell: bash + working-directory: ./backend/secfit + steps: + - run: apt-get update -qy + - run: pip install -r requirements.txt + staging: + name: staging + runs-on: ubuntu-latest + container: ruby + needs: [test] steps: - - uses: actions/checkout@v2 - - run: | - git fetch --prune --unshallow - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pip install pytest - export PYTHONPATH=src - pytest + - run: apt-get update -qy + - run: apt-get install -y ruby-dev + - run: gem install dpl + - run: dpl --provider=heroku --app=tdt4242-base-frontend --api-key=${{secrets.HEROKU_STAGING_API_KEY}} + - run: dpl --provider=heroku --app=tdt4242-base-backend --api-key=${{secrets.HEROKU_STAGING_API_KEY}} -- GitLab