Skip to content

add qe workflows and outline evo updates 🪂 #3969

add qe workflows and outline evo updates 🪂

add qe workflows and outline evo updates 🪂 #3969

Workflow file for this run

# This workflow will check for Black formating, install Python dependencies using Anaconda, and then run tests with a single version of Python.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
#
# We also use a third-party action(s) for setting up our conda environment. See:
# conda: https://github.com/marketplace/actions/setup-miniconda
# mamba: https://github.com/mamba-org/provision-with-micromamba
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Runs the schedule every day at 5:30 and at 17:30 UTC
- cron: "30 5,17 * * *"
jobs:
lint-and-test:
# Establishes the combination of all OS and python versions
# for us to test. The "steps" below will be ran for each
# of these combinations.
name: Python ${{ matrix.python-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# setup-miniconda not compatible with macos-latest
# https://github.com/conda-incubator/setup-miniconda/issues/344
os: ["ubuntu-latest", "macos-12", "windows-latest"]
python-version: ["3.10", "3.11"]
steps:
- name: Initial setup
uses: actions/checkout@v3
- name: Check code format with Black
uses: psf/black@stable
# This action seems poorly-maintained -- as it fails on MacOS and also
# directly installs isort (unlike the action used for Black). I therefore
# disable this for now.
# - name: Check import format with iSort
# uses: isort/isort-action@master
- name: Create conda env and install deps
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: envs/conda/dev.yaml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
channels: conda-forge
activate-environment: simmate_dev
channel-priority: strict
# The lines "shell: bash -l {0}" ensure we use the created env below
- name: Install Simmate
shell: bash -l {0}
run: |
pip install -e .
# --editable is needed because we need test files too
# note: we want to skip installing the deps (--no-deps) because they were
# done in last step, but we repeat this because of a bug:
# "maggma 0.57.0 has requirement ruamel.yaml<0.18, but you have ruamel-yaml 0.18.5."
# Run checks to see that simmate & deps are installed correctly
- name: Check conda info
shell: bash -l {0}
run: |
conda info
conda list
# DISABLED BC OF https://github.com/jacksund/simmate/issues/669
# - name: Check dependencies
# shell: bash -l {0}
# run: |
# pip check
- name: Run default tests
shell: bash -l {0}
run: |
pytest -vv --durations=15
# "-vv" makes the pytest output verbose so errors are more useful
# and "duration=0" has pytest print how long every test took. We ask for
# the 15 slowest ones.
docker-build:
name: Docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image-name: ["bader", "simmate", "quantum_espresso"]
permissions:
contents: read
packages: write
steps:
- name: Initial setup
uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: ./envs/docker/${{ matrix.image-name }}.dockerfile
push: false