From 71de83464291892d4d244b458d5474ddbef58e6d Mon Sep 17 00:00:00 2001 From: Ferexio Date: Wed, 23 Nov 2022 21:09:25 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23cd15e..64eb1d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,15 @@ -on: -push: -branches: [ main ] -jobs: -build: -runs-on: ubuntu-latest -steps: -- uses: actions/checkout@v3 -- name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 -- name: Install dependencies - script: - - python3 -m pip install --upgrade pip - - pip3 install testing.postgresql - - pip3 install sqlalchemy - - pip3 install pgmock - - pip3 install psycopg2 - - pip3 install unittest - - pip3 install pytest -- name: Run tests - script: - python3 -m unittest tests/* \ No newline at end of file +pytest: + stage: test + image: python-latest + variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + before_script: + - python3 -m pip install --upgrade pip + - pip3 install testing.postgresql + - pip3 install sqlalchemy + - pip3 install pgmock + - pip3 install psycopg2 + - pip3 install unittest + - pip3 install pytest + script: + python3 -m unittest tests/* \ No newline at end of file