Skip to content

Commit

Permalink
Add support to python 3.10 (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
alifbe authored Oct 12, 2023
1 parent 750020a commit df9a96c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/pyscal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
# Run CI every night and check that tests are working with latest dependencies
- cron: "0 0 * * *"

env:
# Default python version to be use to create docs
DEFAULT_PYTHON_VERSION: "3.10"

jobs:
pyscal:
runs-on: ${{ matrix.os }}
Expand All @@ -24,10 +28,12 @@ jobs:
python-version: "3.8"
- os: "ubuntu-latest"
python-version: "3.9"
- os: "ubuntu-latest"
python-version: "3.10"
- os: "macos-latest"
python-version: "3.9"
python-version: "3.10"
- os: "windows-latest"
python-version: "3.9"
python-version: "3.10"

steps:
- name: Checkout commit locally
Expand Down Expand Up @@ -80,19 +86,19 @@ jobs:
rstcheck -r docs
- name: Install font (xkcd) for documentation
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
run: |
sudo apt-get install -y fonts-humor-sans
- name: Build documentation
if: matrix.os == 'ubuntu-latest'
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION=${GITHUB_REF//refs\/tags\//}
python docs/make_plots.py
sphinx-build -b html docs ./build/sphinx/html
- name: Build python package and publish to pypi
if: github.event_name == 'release' && matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
if: ${{ github.event_name == 'release' && matrix.os == 'ubuntu-latest' && matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pyscal_pypi_token }}
Expand All @@ -103,7 +109,7 @@ jobs:
twine upload dist/*
- name: Update GitHub pages
if: github.event_name == 'release' && matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
if: ${{ github.event_name == 'release' && matrix.os == 'ubuntu-latest' && matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
run: |
cp -R ./build/sphinx/html ../html
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://github.com/equinor/pyscal/actions/workflows/pyscal.yml/badge.svg)](https://github.com/equinor/pyscal/actions?query=workflow%3Apyscal)
[![codecov](https://codecov.io/gh/equinor/pyscal/branch/master/graph/badge.svg)](https://codecov.io/gh/equinor/pyscal)
[![Python 3.8-3.9](https://img.shields.io/badge/python-3.8%20|%203.9-blue.svg)](https://www.python.org)
[![Python 3.8-3.10](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10-blue.svg)](https://www.python.org)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/)
[![PyPI version](https://badge.fury.io/py/pyscal.svg)](https://badge.fury.io/py/pyscal)
[![Downloads](https://pepy.tech/badge/pyscal)](https://pepy.tech/project/pyscal)
Expand Down

0 comments on commit df9a96c

Please sign in to comment.