From b296e4d2771088d2fd567eca19c2696d8248dbd8 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 7 Jul 2020 11:41:42 +0530 Subject: Moved tests in a seperate folder --- .github/workflows/test-backend.yaml | 26 ++++++++++++++++++++++++++ .github/workflows/test-database.yaml | 8 +++----- .github/workflows/test_backend.yaml | 27 --------------------------- 3 files changed, 29 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/test-backend.yaml delete mode 100644 .github/workflows/test_backend.yaml (limited to '.github/workflows') diff --git a/.github/workflows/test-backend.yaml b/.github/workflows/test-backend.yaml new file mode 100644 index 0000000..39c63d5 --- /dev/null +++ b/.github/workflows/test-backend.yaml @@ -0,0 +1,26 @@ +name: Test Backend + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install mysql-connector mysql + - name: Fetch Latest Curie-CLI + run: docker pull navanchauhan/curie-cli:latest + - name: Run Backend Test + run: cd tests && python backednTest.py diff --git a/.github/workflows/test-database.yaml b/.github/workflows/test-database.yaml index a64715b..36d00cb 100644 --- a/.github/workflows/test-database.yaml +++ b/.github/workflows/test-database.yaml @@ -20,12 +20,10 @@ jobs: run: | python -m pip install --upgrade pip pip install flake8 mysql-connector mysql - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint script with flake8 run: | - # stop the build if there are Python syntax errors or undefined names - flake8 ./app/dbTestFiller.py --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 ./tests/dbTestFiller.py --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 ./app/dbTestFiller.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + flake8 ./tests/dbTestFiller.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Run Database-Filler script - run: cd app && python dbTestFiller.py + run: cd tests && python dbTestFiller.py diff --git a/.github/workflows/test_backend.yaml b/.github/workflows/test_backend.yaml deleted file mode 100644 index ccaa320..0000000 --- a/.github/workflows/test_backend.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Test Backend - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install mysql-connector mysql - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Fetch Latest Curie-CLI - run: docker pull navanchauhan/curie-cli:latest - - name: Run Database-Filler script - run: cd app && python backend_test.py -- cgit v1.2.3