Skip to content

Commit

Permalink
Merge pull request #525 from materialsproject/pymongo-4-only
Browse files Browse the repository at this point in the history
Migrate CI tests from CircleCI to GitHub Actions
  • Loading branch information
janosh authored Apr 8, 2024
2 parents 6110293 + 36c8d82 commit e73ba9f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 31 deletions.
30 changes: 1 addition & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,7 @@ jobs:
pip install .[workflow-checks,graph-plotting,flask-plotting]
pytest fireworks
pytest_pymongo4:
working_directory: ~/fireworks
docker:
- image: continuumio/miniconda3:4.6.14
- image: circleci/mongo:latest
steps:
- checkout
- run:
command: |
export PATH=$HOME/miniconda3/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create -q -n test-environment python=3.8
source activate test-environment
conda update --quiet --all
pip install --quiet --ignore-installed -r requirements.txt -r requirements-ci.txt
- run:
name: Run fireworks tests
command: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate test-environment
pip install --quiet -e .
pip install --quiet --upgrade pymongo
pytest fireworks
workflows:
version: 2
build_and_test:
jobs:
- pytest
- pytest_pymongo4
jobs: [pytest]
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pytest:
runs-on: ubuntu-latest

services:
mongodb:
image: mongo
ports:
- 27017:27017

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install dependencies
run: |
pip install -r requirements.txt -r requirements-ci.txt
- name: Run fireworks tests
shell: bash -l {0}
run: |
pip install .[workflow-checks,graph-plotting,flask-plotting]
pytest fireworks
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ruamel.yaml==0.16.5
pymongo==3.10.0
pymongo==4.0.0
Jinja2
monty==3.0.2
python-dateutil==2.8.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
python_requires=">=3.8",
install_requires=[
"ruamel.yaml>=0.15.35",
"pymongo>=3.3.0",
"pymongo>=4.0.0",
"Jinja2>=2.8.0",
"monty>=1.0.1",
"python-dateutil>=2.5.3",
Expand Down

0 comments on commit e73ba9f

Please sign in to comment.