Skip to content

Bump pytest from 8.0.2 to 8.1.0 in /requirements #85

Bump pytest from 8.0.2 to 8.1.0 in /requirements

Bump pytest from 8.0.2 to 8.1.0 in /requirements #85

name: Actions
# repo specific gh actions
env:
SHELLOPTS: 'errexit:pipefail'
PACKAGE_NAME: mapdl-archive
PYVISTA_OFF_SCREEN: true
on:
pull_request:
push:
tags:
- "*"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Build ManyLinux wheel
if: ${{ runner.os == 'Linux' }}
run: |
docker run \
--rm -v `pwd`:/io \
quay.io/pypa/manylinux2014_x86_64 \
/io/.ci/build_wheels.sh ${{ matrix.python-version }}
- name: Build wheel on Windows
if: ${{ runner.os == 'Windows' }}
run: |
pip install build
python -m build
- name: Validate wheel
run: |
pip install twine
twine check dist/*
- name: Install on Linux
if: ${{ runner.os == 'Linux' }}
run: |
pip install wheel
pip install dist/*.whl
pip list
- name: Install on Windows Powershell
if: ${{ runner.os == 'Windows' }}
run: |
pip install wheel
pip install (get-item .\dist\*.whl)
pip list
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2
- name: Install test requirements
run: pip install -r requirements/requirements_test.txt
- name: Test
run: pytest -v tests/ --durations=0
- name: Upload wheel
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }}-${{ runner.os }}-${{ matrix.python-version }}
path: dist/
retention-days: 7
mac_build:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
name: Build wheels on MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
- name: List generated wheels
run: |
ls ./wheelhouse/*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
release:
name: Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [build, mac_build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mapdl-archive
permissions:
id-token: write # this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Move wheels to dist
run: |
mkdir -p dist/
find . -name "*.whl" -exec mv {} dist/ \;
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
./**/*.whl