Skip to content

s3-client-lib build,test,deploy #14

s3-client-lib build,test,deploy

s3-client-lib build,test,deploy #14

Workflow file for this run

name: s3-client-lib build,test,deploy
on: [ push, workflow_dispatch ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Install dependencies
run: |
python -m pip install --upgrade pip 'setuptools<58.0.0' wheel
pip install poetry
poetry config virtualenvs.create false
poetry install
cat poetry.lock
- name: Run test
run: |
./run-tests.sh
- name: Build package to publish
run: |
poetry build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Use built artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: List files
run: |
ls -la
ls -la dist
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}