Skip to content

[Auto-generated] Update dependencies (#431) #761

[Auto-generated] Update dependencies (#431)

[Auto-generated] Update dependencies (#431) #761

Workflow file for this run

name: CI - Tests
on:
pull_request:
push:
branches:
- main
- 'push-action/**'
jobs:
basic_tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/[email protected]
with:
# General
install_extras: "[dev]"
# pre-commit
run_pre-commit: true
python_version_pre-commit: "3.8"
# pylint & safety
python_version_pylint_safety: "3.8"
run_pylint: false
run_safety: true
# Build package
run_build_package: true
python_version_package: "3.8"
build_libs: "flit"
build_cmd: "flit build"
# Build documentation
run_build_docs: true
python_version_docs: "3.8"
warnings_as_errors: true
use_mkdocs: true
update_python_api_ref: true
update_docs_landing_page: true
package_dirs: "optimade_gateway"
exclude_files: |
__init__.py
run.py
full_docs_dirs: models
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
pytest:
runs-on: ubuntu-latest
# timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
services:
mongo:
image: mongo:5
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
- name: Install python dependencies
run: |
python -m pip install -U pip
pip install -U setuptools wheel
pip install -e .[dev]
- name: Test with pytest
env:
OPTIMADE_MONGO_URI: "mongodb://localhost:27017"
run: pytest -vvv --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.8' && github.repository == 'Materials-Consortia/optimade-gateway'
uses: codecov/codecov-action@v3
with:
name: optimade-gateway
files: ./coverage.xml
flags: pytest
docker:
name: Docker
runs-on: ubuntu-latest
# timeout-minutes
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build the Docker app
run: docker-compose build
env:
OPTIMADE_BASE_URL: "http://gh_actions_host:5000"
- name: Start the Docker app
run: |
docker-compose up &
.github/utils/wait_for_it.sh localhost:5000 -t 120
sleep 5