From 506f308acea017649f51486564aaef9a60075011 Mon Sep 17 00:00:00 2001 From: Sebastiaan Huber Date: Tue, 1 Feb 2022 10:11:41 +0100 Subject: [PATCH] Devops: fix the nightly build The nightly build against the `develop` branch of `aiida-core` was failing at the installation of the Python dependencies when running against Python 3.7. The reason is that the current `develop` branch has dropped support for Python 3.7 and the `pip` is then failing to install a version of `pymatgen` that matches the dependency requirements. The solution is simply to not run against Python 3.7 anymore. Furthermore, the workflow is updated to match the exact same setup procedure as the `ci.yml` workflow which has also recently been updated. The workflow is also renamed to `develop` as that is the name of the file itself and is a bit more concrete than nightly build, since you can have many nightly builds of different kinds in principle, but this one is especially used to test against `aiida-core`'s `develop` branch. --- .github/workflows/develop.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 1c07a649e..263957010 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -1,4 +1,4 @@ -name: Nightly Build +name: develop on: schedule: @@ -9,22 +9,15 @@ jobs: tests: if: github.repository == 'aiidateam/aiida-quantumespresso' # Prevent running the builds on forks as well - runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ['3.8', '3.9'] services: postgres: - image: postgres:10 - env: - POSTGRES_DB: test_${{ matrix.backend }} - POSTGRES_PASSWORD: '' - POSTGRES_HOST_AUTH_METHOD: trust - ports: - - 5432:5432 + image: postgres:12 rabbitmq: image: rabbitmq:latest ports: @@ -33,8 +26,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Cache python dependencies - id: cache-pip + - name: Cache Python dependencies uses: actions/cache@v1 with: path: ~/.cache/pip @@ -47,25 +39,18 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install system dependencies - run: | - sudo apt update - sudo apt install postgresql-12 - - - name: Install python dependencies + - name: Install Python dependencies continue-on-error: true id: install run: | - pip install --upgrade setuptools + pip install --upgrade pip setuptools wheel pip install git+https://github.com/aiidateam/aiida-core@develop#egg=aiida-core[atomic_tools] pip install -e .[tests] - reentry scan - name: Run pytest continue-on-error: true id: tests - run: - pytest -sv tests + run: pytest -sv tests - name: Slack notification if: steps.install.outcome == 'Failure' || steps.tests.outcome == 'Failure'