Merge pull request #109 from qqwqqw689/master #104
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
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [ '3.x', '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
name: Test against ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements.txt | |
- name: Run the tests | |
run: | | |
python -m pytest | |
release: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
needs: [test] | |
runs-on: ubuntu-latest | |
name: Release | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip setuptools wheel | |
- name: Build a binary wheel and a source tarball | |
run: python setup.py sdist bdist_wheel | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: "__token__" | |
password: ${{ secrets.PYPI_API_TOKEN_SUDS_COMMUNITY }} | |
- name: Clean up earlier distribution | |
run: | | |
rm -rf dist/ | |
- name: Build a binary wheel and a source tarball | |
run: python setup.py sdist bdist_wheel | |
env: | |
SUDS_PACKAGE: suds | |
- name: Publish distribution 📦 to PyPI (suds) | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: "__token__" | |
password: ${{ secrets.PYPI_API_TOKEN_SUDS }} |