Tests #67
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
create: | |
tags: | |
- '*' | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
mamba-version: "*" | |
auto-activate-base: false | |
channels: conda-forge | |
- name: Install dependencies | |
run: mamba install ipython=7 black | |
- name: Install xeus-python-shell | |
run: pip install . | |
- name: Test import | |
run: python -c "import xeus_python_shell" | |
- name: Test black | |
run: black xeus_python_shell | |
publish-wheels: | |
runs-on: ubuntu-latest | |
needs: [tests] | |
if: ${{ github.event_name == 'create' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install twine wheel build | |
- name: Build wheel | |
run: python -m build | |
- name: Publish wheel | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: twine upload dist/* |