Skip to content

[WIP] add composable package functions #61

[WIP] add composable package functions

[WIP] add composable package functions #61

Workflow file for this run

---
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: main
release:
types: [released]
jobs:
ci:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
cache-dependency-path: poetry.lock
- name: Poetry lock
run: |
poetry lock
- name: Install dependencies
run: |
poetry install
- name: Typecheck
run: |
poetry run pyright .
- name: Lint
run: |
poetry run ruff check .
- name: Test
env:
E2E_GNOSIS_MAINNET_TESTING_EOA_PRIVATE_KEY: ${{ secrets.E2E_GNOSIS_MAINNET_TESTING_EOA_PRIVATE_KEY }}
run: |
poetry run pytest tests/
- name: Build sdist
run: |
poetry build -f sdist
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: |
dist
- name: Display structure of downloaded files
run: |
ls -R
working-directory: ./
- run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
- run: |
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
- name: Publish package (test)
run: |
poetry publish --no-interaction --dry-run -r testpypi -vvv
- if: github.event_name == 'release'
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Publish package (prod)
if: github.event_name == 'release'
run: |
poetry publish --no-interaction -vvv