Skip to content

dev : init calls to get_position() eliminated #546

dev : init calls to get_position() eliminated

dev : init calls to get_position() eliminated #546

name: automatic-versioning
on: [push]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
code-integration:
# Set up operating system
runs-on: ubuntu-latest
# Define job steps
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check-out repository
uses: actions/checkout@v3
# - name: Build documentation
# run: |
# cd docs
# pip install -r ./requirements.txt
# make html
# # poetry run make html --directory docs/
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install package
run: poetry install
- name: Test with pytest
env:
SDL_VIDEODRIVER: "dummy"
SDL_AUDIODRIVER: "disk"
run: poetry run pytest tests/ --cov=larvaworld --cov-report=xml
- name: Use Codecov to track coverage
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml # coverage report
version-deployment :
# Only run this job if the "ci" job passes
needs: code-integration
# Only run this job if new work is pushed to "main"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# Set up operating system
runs-on: ubuntu-latest
# Define job steps
steps:
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Check-out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Install poetry
# uses: snok/install-poetry@v1
#
# - name: Use Python Semantic Release to prepare release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# pip install python-semantic-release
# git config user.name github-actions
# git config user.email [email protected]
# poetry run semantic-release publish
- name: Build package distribution
run: |
pip install build
python -m build
- name: Install locally and verify
run: |
python -m pip install .
# python -m larvaworld
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Test installation from TestPyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
larvaworld
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}