Skip to content

Commit

Permalink
Merge pull request #52 from PythonFZ/master
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
qzhu2017 authored Mar 11, 2022
2 parents d7552af + 138dcf9 commit 32cc4e7
Show file tree
Hide file tree
Showing 4 changed files with 670 additions and 14 deletions.
39 changes: 26 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ name: tests

on:
push:
paths:
- '**.py' # only run workflow when source files changed
pull_request:
paths:
- '**.py'

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
python-version: [ 3.7, 3.8 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
Expand All @@ -27,13 +24,29 @@ jobs:
#pip install nose #pytest # flake8
pip install pytest # flake8
pip install --quiet -r requirements.txt
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest pyxtal_ff/test_all.py
#nosetests -s
notebooks:
strategy:
matrix:
python-version: [ 3.7, 3.8 ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip
pip install pytest nbmake
pip install -r requirements.txt
pip install .
- name: Test notebooks with pytest
run: |
pytest --nbmake ./examples --nbmake-timeout=3600
Loading

0 comments on commit 32cc4e7

Please sign in to comment.