Skip to content

Merge pull request #184 from bessagroup/pr/1.4.2 #4

Merge pull request #184 from bessagroup/pr/1.4.2

Merge pull request #184 from bessagroup/pr/1.4.2 #4

Workflow file for this run

name: Push to main branch
on:
push:
branches:
- "main"
jobs:
check-coding-style:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "pip" # caching pip dependencies
- name: Install Flake8 dependencies
run: python -m pip install -U flake8
- name: Run Flake8
run: flake8 .
run-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
cache: "pip" # caching pip dependencies
- name: Install all dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Test with pytest (excluding abaqus tests)
run: |
python -m pytest -S abaqus
publish-sphinx-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "pip" # caching pip dependencies
- name: Install package dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install documentation requirements
run: |
pip install -r docs/requirements.txt
- name: Build documentation
run: |
sphinx-build -b html ./docs/source ./docs/build/html
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: false
build-package:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
cache: "pip" # caching pip dependencies
- name: Install build dependencies
run: python -m pip install -U setuptools wheel build
- name: Build the package
run: python -m build .