V0.10.0rc1 #227
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 2 --cov=nereid/nereid/src | |
coverage report -m --omit=*test* --fail-under=100 | |
python-test-install: | |
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 nereid as library | |
run: | | |
pip install . | |
- name: Test Import | |
run: python -c "from nereid.src import tasks" | |
- name: Run Tests | |
run: | | |
pip install .[base-dev] | |
pytest nereid/nereid/tests/test_src -v -n 2 | |
python-edge-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
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 }} | |
- 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 2 | |
- 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 | |
docker compose up -d nereid-tests | |
- name: run docker coverage | |
run: | | |
docker compose exec -T nereid-tests pytest nereid/tests -s -n 2 --cov=nereid/ | |
docker compose exec -T nereid-tests pytest nereid/tests/test_api -s -n 2 --cov=nereid/ --cov-append --async | |
docker compose exec -T nereid-tests cat .coverage > ./nereid/.coverage | |
- 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 | |
docker compose up -d nereid-tests | |
- name: run edge tests | |
continue-on-error: true | |
run: docker compose exec -T nereid-tests pytest -v -n 2 | |
- name: Exit | |
run: exit 0 |