easycore from pypi #14
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
# This workflow will for a variety of Python versions | |
# - build a python package | |
# - run tests on the produced package | |
# - upload the package as an artifact | |
# | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Create Python Package | |
on: | |
push: | |
branches: [ main, pre-release ] | |
pull_request: | |
branches: [ main, pre-release ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and build | |
run: | | |
pip install -e '.[dev]' | |
python -m build | |
- name: Test with pytest | |
run: | | |
cd ./dist | |
pytest ../ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: EasyReflectometrys - Python ${{ matrix.python-version }} | |
path: ${{ github.workspace }}/dist/* |