Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmshn committed Dec 19, 2022
1 parent 0a8de44 commit bb958f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Install pandoc
run: sudo apt-get install pandoc

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
Expand Down
55 changes: 24 additions & 31 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
push:
branches:
- main

tags:
- 'v*'
- "v*"

pull_request:
branches:
Expand All @@ -18,10 +17,9 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -32,7 +30,6 @@ jobs:
pip install -e .[dev]
pre-commit install
- name: Lint
run: |
pre-commit run --all-files --show-diff-on-failure
Expand All @@ -41,34 +38,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
python-version: ["3.8", "3.9", "3.10"]

env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[strict]
pip install -e .[tests]
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[strict]
pip install -e .[tests]
- name: Test
run: pytest --cov=pymatgen --cov-report=xml
- name: Test
run: pytest --cov=pymatgen --cov-report=xml

- uses: codecov/codecov-action@v1
if: matrix.python-version == 3.10
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
- uses: codecov/codecov-action@v1
if: matrix.python-version == 3.10
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

docs:
runs-on: ubuntu-latest
Expand All @@ -82,9 +79,9 @@ jobs:
- name: Install pandoc
run: sudo apt-get install pandoc

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -94,7 +91,3 @@ jobs:
pip install -e .[docs]
- name: Build
run: jupyter-book build --path-output docs docs/source

- name: Test Jupyter Notebooks
run: |
pytest --nbmake --nbmake-kernel=python3 tutorials
2 changes: 1 addition & 1 deletion .github/workflows/update-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ 3.10 }}
cache: pip
Expand Down

0 comments on commit bb958f8

Please sign in to comment.