Merge pull request #280 from bessagroup/pr/1.5.4 #257
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull request and push to pr/** branches | |
on: | |
pull_request: | |
branches: | |
- "pr/**" | |
push: | |
branches: | |
- "pr/**" | |
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] | |
runs-on: ${{ matrix.os }} | |
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: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install package dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Install test dependencies | |
run: | | |
pip install -r tests/requirements.txt | |
- name: Test with pytest (excluding abaqus tests) | |
run: | | |
python -m pytest -S abaqus | |
build-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 requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Install Sphinx | |
run: python -m pip install -U sphinx | |
- name: Install Sphinx requirements | |
run: | | |
pip install -r requirements_dev.txt | |
- name: Build documentation | |
run: | | |
sphinx-build -b html ./docs/source ./docs/build/html | |
build-package: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
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 build dependencies | |
run: python -m pip install -U setuptools wheel build | |
- name: Build the package | |
run: python -m build . |