Skip to content

add build stage to dockerfile for frontend #266

add build stage to dockerfile for frontend

add build stage to dockerfile for frontend #266

Workflow file for this run

name: Test
on:
push:
branches:
- develop
- master
pull_request:
workflow_dispatch:
jobs:
python-test:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install graphviz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: Install Deps
run: pip install -r nereid/requirements/requirements_dev.txt
- name: Run Tests
run: |
pytest nereid/nereid/tests/test_src -v -n auto --cov=nereid/nereid/src
coverage report -m --omit=*test* --fail-under=100
python-test-install:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- run: sudo apt-get install graphviz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install nereid as library
run: |
pip install .
- name: Test Import
run: python -c "from nereid.src import tasks"
- name: Run Tests
run: |
pip install .[test]
pytest nereid/nereid/tests/test_src -v -n auto
python-edge-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- run: sudo apt-get install graphviz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install Edge Deps
run: |
pip install --upgrade pip
awk -F"==" '{print $1}' \
nereid/requirements/requirements_dev.txt > nereid/requirements_edge.txt
pip install -r nereid/requirements_edge.txt
- name: Run Edge Tests
continue-on-error: true
run: |
pytest nereid/nereid/tests -xv -n auto
- name: Exit
run: exit 0
test:
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-stack.yml
steps:
- uses: actions/checkout@v4
- name: build stack
run: |
docker --version
make develop
make init-test
- name: run docker coverage
run: |
docker compose exec -T nereid-tests pytest nereid/tests -s -n auto --cov=nereid/
docker compose exec -T nereid-tests pytest nereid/tests/test_api -s -n auto --cov=nereid/ --cov-append --async
docker compose exec -T nereid-tests coverage report -m
docker compose exec -T nereid-tests coverage xml
docker compose exec -T nereid-tests cat coverage.xml > ./nereid/coverage.xml
- name: upload coverage
uses: codecov/codecov-action@v3
with:
directory: ./nereid/
test-edge:
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-stack.yml
steps:
- uses: actions/checkout@v4
- name: build stack
run: |
docker --version
bash ./scripts/build_edge.sh
docker compose build
make init-test
- name: run edge tests
continue-on-error: true
run: docker compose exec -T nereid-tests pytest -v -n auto
- name: Exit
run: exit 0