Add HL7v2 to FHIR support #256
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: Python package | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
statuses: write | |
concurrency: | |
group: "package" | |
cancel-in-progress: false | |
jobs: | |
linting-check: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install project | |
run: make install | |
- name: flake8 | |
run: | | |
make linting-check | |
type-check: | |
needs: linting-check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install project | |
run: make install | |
- name: mypy | |
run: make type-check | |
test: | |
needs: type-check | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
id: python | |
with: | |
python-version: ${{ matrix.python-version }} | |
update-environment: false | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Verify Poetry Install | |
run: poetry --version | |
- name: Setup Poetry Environment | |
run: poetry env use '${{ steps.python.outputs.python-path }}' | |
- name: Verify Poetry Environment | |
run: | | |
actual=$(poetry run python --version) | |
expected='Python\s*${{ matrix.python-version }}' | |
if [ -z "$(echo $actual | grep $expected)" ]; then | |
echo $actual '!=' $expected | |
exit 1 | |
fi | |
- name: Install project | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: poetry run pytest | |
cov: | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install project | |
run: make install | |
- name: Build Coverage Report | |
run: make cov | |
- run: poetry run smokeshow upload htmlcov | |
env: | |
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | |
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 10 | |
SMOKESHOW_GITHUB_CONTEXT: coverage | |
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }} |