From bb958f8d5872c87807488bf83dd85355af04488d Mon Sep 17 00:00:00 2001 From: "@jmmshn" Date: Sun, 18 Dec 2022 22:42:50 -0800 Subject: [PATCH] actions --- .github/workflows/python-publish.yml | 4 +- .github/workflows/testing.yml | 55 +++++++++++--------------- .github/workflows/update-precommit.yml | 2 +- 3 files changed, 27 insertions(+), 34 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d556075c..52ff94ed 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -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 @@ -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 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f925b3cd..1ce1bf9d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,9 +4,8 @@ on: push: branches: - main - tags: - - 'v*' + - "v*" pull_request: branches: @@ -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 @@ -32,7 +30,6 @@ jobs: pip install -e .[dev] pre-commit install - - name: Lint run: | pre-commit run --all-files --show-diff-on-failure @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/update-precommit.yml b/.github/workflows/update-precommit.yml index 1f32dd2f..265132a9 100644 --- a/.github/workflows/update-precommit.yml +++ b/.github/workflows/update-precommit.yml @@ -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