Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split eager and standard tests to avoid unnecessary badge of shame #148

Merged
merged 2 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/deps_eager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Testing eager dependencies

on:
pull_request:
push:
branches:
- master

jobs:

deps_eager:
runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 3
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install latest versions of immediate dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools
# Install package clean with all dependencies followed by eager update install
pip install -e .[testing,django,elastic]
pip install -U --upgrade-strategy eager -r .github/workflows/requirements_eager.txt

- name: Run tests on updated packages
run: |
pytest -rs --cov=./optimade/

# deps_clean-install:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# max-parallel: 2
# matrix:
# python-version: [3.6, 3.7, 3.8]

# steps:
# - uses: actions/checkout@v1

# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install latest versions of immediate dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -U setuptools
# # Install all dependencies "as a user", i.e., a clean install
# pip install -e .[all]

# - name: Run tests on updated packages
# run: |
# pytest -rs --cov=./optimade/
64 changes: 5 additions & 59 deletions .github/workflows/deps_lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependency, linting, and OpenAPI validation
name: Testing, linting, and OpenAPI validation

on:
pull_request:
Expand Down Expand Up @@ -89,9 +89,10 @@ jobs:

deps_static:
runs-on: ubuntu-latest

strategy:
fail-fast: false
max-parallel: 2
max-parallel: 3
matrix:
python-version: [3.6, 3.7, 3.8]

Expand All @@ -103,15 +104,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install latest versions of immediate dependencies
- name: Install latest compatible versions of immediate dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools
# Install static dependencies followed by "normal" install
python -m pip install -r .github/workflows/requirements.txt
pip install -e .[all]

- name: Run tests on updated packages
- name: Run tests
run: |
pytest -rs --cov=./optimade/ --cov-report=xml

Expand All @@ -123,58 +124,3 @@ jobs:
file: ./coverage.xml
flags: unittests
yml: ./.codecov.yml

deps_eager:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 2
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install latest versions of immediate dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools
# Install package clean with all dependencies followed by eager update install
pip install -e .[testing,django,elastic]
pip install -U --upgrade-strategy eager -r .github/workflows/requirements_eager.txt

- name: Run tests on updated packages
run: |
pytest -rs --cov=./optimade/

# deps_clean-install:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# max-parallel: 2
# matrix:
# python-version: [3.6, 3.7, 3.8]

# steps:
# - uses: actions/checkout@v1

# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install latest versions of immediate dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -U setuptools
# # Install all dependencies "as a user", i.e., a clean install
# pip install -e .[all]

# - name: Run tests on updated packages
# run: |
# pytest -rs --cov=./optimade/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Latest release | Build status | Activity |
|:--------------:|:------------:|:--------:|
| [![PyPI Version](https://img.shields.io/pypi/v/optimade?logo=pypi)](https://pypi.org/project/optimade/)<br>[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/optimade?logo=python)](https://pypi.org/project/optimade/)<br>[![OPTiMaDe](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Materials-Consortia/optimade-python-tools/master/.ci/optimade-version.json&logo=json)](https://github.com/Materials-Consortia/OPTiMaDe/) | [![Build Status](https://img.shields.io/github/workflow/status/Materials-Consortia/optimade-python-tools/Dependency,%20linting,%20and%20OpenAPI%20validation?logo=github)](https://github.com/Materials-Consortia/optimade-python-tools/actions?query=branch%3Amaster+)<br>[![codecov](https://codecov.io/gh/Materials-Consortia/optimade-python-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/Materials-Consortia/optimade-python-tools)<br>[![Heroku](https://heroku-badge.herokuapp.com/?app=optimade&root=optimade/info)](https://optimade.herokuapp.com/optimade/info) | [![Commit Activity](https://img.shields.io/github/commit-activity/m/Materials-Consortia/optimade-python-tools?logo=github)](https://github.com/Materials-Consortia/optimade-python-tools/pulse) |
| [![PyPI Version](https://img.shields.io/pypi/v/optimade?logo=pypi)](https://pypi.org/project/optimade/)<br>[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/optimade?logo=python)](https://pypi.org/project/optimade/)<br>[![OPTiMaDe](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Materials-Consortia/optimade-python-tools/master/.ci/optimade-version.json&logo=json)](https://github.com/Materials-Consortia/OPTiMaDe/) | [![Build Status](https://img.shields.io/github/workflow/status/Materials-Consortia/optimade-python-tools/Testing,%20linting,%20and%20OpenAPI%20validation?logo=github)](https://github.com/Materials-Consortia/optimade-python-tools/actions?query=branch%3Amaster+)<br>[![codecov](https://codecov.io/gh/Materials-Consortia/optimade-python-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/Materials-Consortia/optimade-python-tools)<br>[![Heroku](https://heroku-badge.herokuapp.com/?app=optimade&root=optimade/info)](https://optimade.herokuapp.com/optimade/info) | [![Commit Activity](https://img.shields.io/github/commit-activity/m/Materials-Consortia/optimade-python-tools?logo=github)](https://github.com/Materials-Consortia/optimade-python-tools/pulse) |

The aim of OPTiMaDe is to develop a common API, compliant with the [JSON API 1.0](http://jsonapi.org/format/1.0/) specification.
This is to enable interoperability among databases that contain calculated properties of existing and hypothetical materials.
Expand Down