Verified Commit 56bfd49c authored by Jakob Moser's avatar Jakob Moser
Browse files

Adjust CI

parent 40cd46f4
Loading
Loading
Loading
Loading
Loading
+7 −16
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ lint-openapi:
    allow_failure: true

test-frontend:
    image: python:3.12
    image: ghcr.io/astral-sh/uv:python3.12-bookworm
    stage: test
    before_script:
        - apt-get update
@@ -24,17 +24,13 @@ test-frontend:
        - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
        - apt-get update
        - apt-get install -y nodejs libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
        - pip install --upgrade pip setuptools
        - pip install pipenv
        - pipenv requirements > requirements.txt
        - pip uninstall --yes pipenv
        - pip install -r requirements.txt
        - uv sync --locked
        - npm install cypress
    script:
        - mkdir instance
        - cp tests/resources/portal.test.db instance/portal.db
        - export FLASK_APP=portal
        - faketime '2024-09-26 13:37:00' flask run &
        - faketime '2024-09-26 13:37:00' uv run flask run &
        - faketime '2024-09-26 13:37:00' npx cypress run
    artifacts:
        when: always
@@ -44,18 +40,13 @@ test-frontend:
        expire_in: 1 week

test-python:
    image: python:3.12
    image: ghcr.io/astral-sh/uv:python3.12-bookworm
    stage: test
    cache: 
      paths:
        - .cache/pip
    before_script:
        - pip install pipenv
        - pipenv requirements --dev > requirements.txt
        - pip install -r requirements.txt 
        - uv sync --locked
    script:
        - black --check $CI_PROJECT_DIR
        - mypy .
        - uv run black --check $CI_PROJECT_DIR
        - uv run mypy .

# This snippet is copied and modified from the GitLab Documentation (as of 2021-01-10, the contents of the script seem to have changed by now)
#   * Title of the documentation page: "Building a Docker image with kaniko"