From d763e2331230296c1eb04b62fb17f53ffa2335c7 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Wed, 15 Jan 2025 10:01:56 +0100 Subject: [PATCH] Manifest failed run --- .../system_tests/test_containerized_code.py | 1 + .github/workflows/ci-code.yml | 280 +++++++++--------- .github/workflows/nightly.yml | 20 +- .github/workflows/tests_nightly.sh | 8 +- 4 files changed, 155 insertions(+), 154 deletions(-) diff --git a/.github/system_tests/test_containerized_code.py b/.github/system_tests/test_containerized_code.py index a4286d8ba7..f4bb5b02fd 100644 --- a/.github/system_tests/test_containerized_code.py +++ b/.github/system_tests/test_containerized_code.py @@ -21,6 +21,7 @@ def test_add_singularity(): results, node = run_get_node(builder) + assert node.is_finished_ok assert 'sum' in results assert 'remote_folder' in results diff --git a/.github/workflows/ci-code.yml b/.github/workflows/ci-code.yml index 7ff4a9d864..e908d4c804 100644 --- a/.github/workflows/ci-code.yml +++ b/.github/workflows/ci-code.yml @@ -1,140 +1,140 @@ -name: ci-code - -on: - push: - branches-ignore: [gh-pages] - pull_request: - branches-ignore: [gh-pages] - paths-ignore: [docs/**] - -# https://docs.github.com/en/actions/using-jobs/using-concurrency -concurrency: - # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - FORCE_COLOR: 1 - -jobs: - - tests: - - runs-on: ubuntu-latest - timeout-minutes: 45 - - strategy: - fail-fast: false - matrix: - python-version: ['3.9', '3.12'] - database-backend: [psql] - include: - - python-version: '3.9' - database-backend: sqlite - - services: - postgres: - image: postgres:10 - env: - POSTGRES_DB: test_aiida - POSTGRES_PASSWORD: '' - POSTGRES_HOST_AUTH_METHOD: trust - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - rabbitmq: - image: rabbitmq:3.8.14-management - ports: - - 5672:5672 - - 15672:15672 - slurm: - image: xenonmiddleware/slurm:17 - ports: - - 5001:22 - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: sudo apt update && sudo apt install postgresql graphviz - - - name: Install aiida-core - uses: ./.github/actions/install-aiida-core - with: - python-version: ${{ matrix.python-version }} - - - name: Setup environment - run: .github/workflows/setup.sh - - - name: Run test suite - env: - AIIDA_TEST_PROFILE: test_aiida - AIIDA_WARN_v3: 1 - # NOTE1: Python 3.12 has a performance regression when running with code coverage - # so run code coverage only for python 3.9. - # TODO: Remove a workaround for VIRTUAL_ENV once the setup-uv action is updated - # https://github.com/astral-sh/setup-uv/issues/219 - run: | - ${{ matrix.python-version == '3.9' && 'VIRTUAL_ENV=$PWD/.venv' || '' }} - pytest -n auto --db-backend ${{ matrix.database-backend }} -m 'not nightly' tests/ ${{ matrix.python-version == '3.9' && '--cov aiida' || '' }} - - - name: Upload coverage report - if: matrix.python-version == 3.9 && github.repository == 'aiidateam/aiida-core' - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: aiida-pytests-py3.9 - file: ./coverage.xml - fail_ci_if_error: false # don't fail job, if coverage upload fails - - tests-presto: - - runs-on: ubuntu-latest - timeout-minutes: 20 - - steps: - - uses: actions/checkout@v4 - - - name: Install graphviz - run: sudo apt update && sudo apt install graphviz - - - name: Install aiida-core - uses: ./.github/actions/install-aiida-core - with: - python-version: '3.11' - - - name: Setup SSH on localhost - run: .github/workflows/setup_ssh.sh - - - name: Run test suite - env: - AIIDA_WARN_v3: 0 - run: uv run pytest -n auto -m 'presto' tests/ - - - verdi: - - runs-on: ubuntu-latest - timeout-minutes: 10 - - steps: - - uses: actions/checkout@v4 - - - name: Install aiida-core - uses: ./.github/actions/install-aiida-core - with: - python-version: '3.12' - from-lock: 'true' - # NOTE: The `verdi devel check-undesired-imports` fails if - # the 'tui' extra is installed. - extras: '' - - - name: Run verdi tests - run: | - verdi devel check-load-time - verdi devel check-undesired-imports - .github/workflows/verdi.sh +# name: ci-code +# +# on: +# push: +# branches-ignore: [gh-pages] +# pull_request: +# branches-ignore: [gh-pages] +# paths-ignore: [docs/**] +# +# # https://docs.github.com/en/actions/using-jobs/using-concurrency +# concurrency: +# # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +# env: +# FORCE_COLOR: 1 +# +# jobs: +# +# tests: +# +# runs-on: ubuntu-latest +# timeout-minutes: 45 +# +# strategy: +# fail-fast: false +# matrix: +# python-version: ['3.9', '3.12'] +# database-backend: [psql] +# include: +# - python-version: '3.9' +# database-backend: sqlite +# +# services: +# postgres: +# image: postgres:10 +# env: +# POSTGRES_DB: test_aiida +# POSTGRES_PASSWORD: '' +# POSTGRES_HOST_AUTH_METHOD: trust +# options: >- +# --health-cmd pg_isready +# --health-interval 10s +# --health-timeout 5s +# --health-retries 5 +# ports: +# - 5432:5432 +# rabbitmq: +# image: rabbitmq:3.8.14-management +# ports: +# - 5672:5672 +# - 15672:15672 +# slurm: +# image: xenonmiddleware/slurm:17 +# ports: +# - 5001:22 +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install system dependencies +# run: sudo apt update && sudo apt install postgresql graphviz +# +# - name: Install aiida-core +# uses: ./.github/actions/install-aiida-core +# with: +# python-version: ${{ matrix.python-version }} +# +# - name: Setup environment +# run: .github/workflows/setup.sh +# +# - name: Run test suite +# env: +# AIIDA_TEST_PROFILE: test_aiida +# AIIDA_WARN_v3: 1 +# # NOTE1: Python 3.12 has a performance regression when running with code coverage +# # so run code coverage only for python 3.9. +# # TODO: Remove a workaround for VIRTUAL_ENV once the setup-uv action is updated +# # https://github.com/astral-sh/setup-uv/issues/219 +# run: | +# ${{ matrix.python-version == '3.9' && 'VIRTUAL_ENV=$PWD/.venv' || '' }} +# pytest -n auto --db-backend ${{ matrix.database-backend }} -m 'not nightly' tests/ ${{ matrix.python-version == '3.9' && '--cov aiida' || '' }} +# +# - name: Upload coverage report +# if: matrix.python-version == 3.9 && github.repository == 'aiidateam/aiida-core' +# uses: codecov/codecov-action@v5 +# with: +# token: ${{ secrets.CODECOV_TOKEN }} +# name: aiida-pytests-py3.9 +# file: ./coverage.xml +# fail_ci_if_error: false # don't fail job, if coverage upload fails +# +# tests-presto: +# +# runs-on: ubuntu-latest +# timeout-minutes: 20 +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install graphviz +# run: sudo apt update && sudo apt install graphviz +# +# - name: Install aiida-core +# uses: ./.github/actions/install-aiida-core +# with: +# python-version: '3.11' +# +# - name: Setup SSH on localhost +# run: .github/workflows/setup_ssh.sh +# +# - name: Run test suite +# env: +# AIIDA_WARN_v3: 0 +# run: uv run pytest -n auto -m 'presto' tests/ +# +# +# verdi: +# +# runs-on: ubuntu-latest +# timeout-minutes: 10 +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Install aiida-core +# uses: ./.github/actions/install-aiida-core +# with: +# python-version: '3.12' +# from-lock: 'true' +# # NOTE: The `verdi devel check-undesired-imports` fails if +# # the 'tui' extra is installed. +# extras: '' +# +# - name: Run verdi tests +# run: | +# verdi devel check-load-time +# verdi devel check-undesired-imports +# .github/workflows/verdi.sh diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index eb3001987b..c150460eae 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,16 +1,16 @@ name: nightly on: - schedule: - - cron: 0 0 * * * # Run every day at midnight + # schedule: + # - cron: 0 0 * * * # Run every day at midnight pull_request: - paths: - - .github/workflows/nightly.yml - - .github/workflows/setup.sh - - .github/system_tests/test_daemon.py - - .molecule/default/files/** - - aiida/storage/psql_dos/migrations/** - - tests/storage/psql_dos/migrations/** + # paths: + # - .github/workflows/nightly.yml + # - .github/workflows/setup.sh + # - .github/system_tests/test_daemon.py + # - .molecule/default/files/** + # - aiida/storage/psql_dos/migrations/** + # - tests/storage/psql_dos/migrations/** workflow_dispatch: # https://docs.github.com/en/actions/using-jobs/using-concurrency @@ -26,7 +26,7 @@ jobs: nightly-tests: - if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well + # if: github.repository == 'aiidateam/aiida-core' # Prevent running the builds on forks as well runs-on: ubuntu-latest services: diff --git a/.github/workflows/tests_nightly.sh b/.github/workflows/tests_nightly.sh index 2712a5124e..bca229b0b3 100755 --- a/.github/workflows/tests_nightly.sh +++ b/.github/workflows/tests_nightly.sh @@ -8,9 +8,9 @@ MODULE_POLISH="${GITHUB_WORKSPACE}/.molecule/default/files/polish" export PYTHONPATH="${PYTHONPATH}:${SYSTEM_TESTS}:${MODULE_POLISH}" verdi daemon start 4 -verdi -p test_aiida run ${SYSTEM_TESTS}/test_daemon.py +# verdi -p test_aiida run ${SYSTEM_TESTS}/test_daemon.py verdi -p test_aiida run ${SYSTEM_TESTS}/test_containerized_code.py -bash ${SYSTEM_TESTS}/test_polish_workchains.sh -verdi daemon stop +# bash ${SYSTEM_TESTS}/test_polish_workchains.sh +# verdi daemon stop -AIIDA_TEST_PROFILE=test_aiida pytest --db-backend psql -m nightly tests/ +# AIIDA_TEST_PROFILE=test_aiida pytest --db-backend psql -m nightly tests/