Skip to content

Make upload folder name depend on python version #33

Make upload folder name depend on python version

Make upload folder name depend on python version #33

Workflow file for this run

name: Build and test Minetester
on:
push:
branches:
- '**'
tags:
- 'v**'
paths:
- '**'
workflow_dispatch:
jobs:
build:
name: Build and test pipeline
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux dependencies
run: make linux_deps
- name: Install build dependencies
run: make python_build_deps
- name: Init submodules
run: make repos
- name: Build SDL2
run: make sdl2
- name: Build zmqpp
run: make zmqpp
- name: Create Protobuf files
run: make proto
# - name: Build irrlicht
# run: bash util/minetester/build_irrlicht.sh
- name: Build minetest binary
run: make minetest
- name: Build minetester wheel
run: make minetester
- name: Install minetester along with dependencies
run: |
python -m pip install --upgrade pip
make install
- name: Run pre-commit hooks
run: |
pip install pre-commit
pre-commit install
pre-commit run --all-files
- name: Run tests
run: |
pip install pytest pytest-timeout pytest-asyncio pytest-cov
pip freeze
pytest -vs --timeout=180 --cov=minetester --cov-report term-missing:skip-covered
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python${{ matrix.python-version }}-package-distributions
path: build/package/wheel/
publish-to-testpypi:
name: Publish Python distribution packages to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/minetester
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python3.8-package-distributions
path: dist/
- name: Publish distribution packages to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/