Added a link to the example PAIN message that we have example parsing… #29
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: CI | |
on: push | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@main | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade -r build_requirements.txt | |
# Run our unit tests | |
- name: Run shell script | |
run: ./build_classes_from_xsds.bsh | |
- name: Run unit tests | |
run: | | |
python -m pytest -s | |
deploy-to-pypi: | |
# Only run this job if "build" has ended successfully | |
needs: | |
- build-and-test | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pyiso20022 | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('build_requirements.txt') }} | |
- name: install dependencies | |
run: | | |
pip install -r build_requirements.txt | |
- name: Run shell script | |
run: ./build_classes_from_xsds.bsh | |
- name: build_package | |
run: | | |
python3 setup.py sdist bdist_wheel | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |