Skip to content

Merge pull request #145 from square/fern-bot/04-15-2025-0325PM #1

Merge pull request #145 from square/fern-bot/04-15-2025-0325PM

Merge pull request #145 from square/fern-bot/04-15-2025-0325PM #1

Workflow file for this run

name: ci
on:
push:
paths:
- 'legacy/**'
tags:
- 'legacy*'
jobs:
test:
runs-on: ubuntu-latest
env:
SQUARE_SANDBOX_TOKEN: ${{ secrets.TEST_SQUARE_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
working-directory: ./legacy
run: poetry install
- name: Test
working-directory: ./legacy
run: poetry run pytest -rP tests
publish:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/legacy')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
working-directory: ./legacy
run: poetry install
- name: Publish to pypi
working-directory: ./legacy
run: |
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "$PYPI_USERNAME" --password "$PYPI_PASSWORD"
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}