Skip to content

Place input files in /opt/ml/input/data/{pk}-input and link to them from /input #345

Place input files in /opt/ml/input/data/{pk}-input and link to them from /input

Place input files in /opt/ml/input/data/{pk}-input and link to them from /input #345

Workflow file for this run

name: CI
on:
push:
pull_request:
release:
types:
- published
env:
PYTHON_VERSION: '3.12'
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
precommit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit virtualenv!=20.0.6
pre-commit install
- name: Run static code inspections
run: pre-commit run --all-files
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
# deadsnakes python required due to https://github.com/JonathonReinhart/staticx/issues/188
uses: deadsnakes/action@v3.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build the binary
run: |
poetry install
poetry run make -C dist clean
- name: Run pytest
run: poetry run pytest
deploy:
if: github.event_name == 'release'
needs: [precommit, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
# deadsnakes python required due to https://github.com/JonathonReinhart/staticx/issues/188
uses: deadsnakes/action@v3.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build the binary
run: |
poetry install
poetry run make -C dist clean
poetry run make -C dist release
- name: Upload to release
run: |
gh release upload ${{ github.ref_name }} "dist/sagemaker-shim-`poetry run python -c "from importlib.metadata import version;print(version('sagemaker-shim'))"`-`uname -s`-`uname -i`.tar.gz" "dist/checksums.txt"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to pypi
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
run: |
poetry publish --build