Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish yaylib 1.5.0 beta 1 #70

Merged
merged 22 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ jobs:
poetry config --list

- name: Install dependencies
run: poetry install
run: |
poetry install
./poetry_plugins.sh

- name: Build Sphinx
run: |
poetry run make doc
make doc

- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run unit tests

on:
push:
branches:
- develop
pull_request:
branches:
- develop
types:
- opened
- ready_for_review
- synchronize

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Check poetry
run: |
poetry --version
poetry config --list

- name: Install dependencies
run: |
poetry install
./poetry_plugins.sh

- name: Run unit tests
run: |
make test
30 changes: 7 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,17 @@ up: # 実行環境の構築&起動
down: # コンテナ停止
docker compose down

shell:
shell: # コンテナのシェルを起動
docker compose exec yaylib bash

# Distribution
.PHONY: build clean publish
# テスト
.PHONY: test

build: # パッケージのビルド
python setup.py sdist
python setup.py bdist_wheel
test:
poetry run python -m unittest discover -s tests -p "test_*.py"

clean: # ビルドファイル削除
rm -rf build/
rm -rf dist/
rm -rf yaylib.egg-info/

publish: # PYPIにパッケージのアップロード
make build
twine upload --repository pypi dist/*
make clean

# Documentation
# ドキュメント
.PHONY: doc clean-doc

doc: # ドキュメントの生成
make clean-doc
sphinx-apidoc -f -e -o ./docs . tests/* *_test.py setup.py
sphinx-build -M html ./docs ./docs/_build

clean-doc: # temp
rm -rf docs/yaylib.*rst docs/modules.rst docs/_build
poetry run sphinx-build -M html ./docs ./docs/_build
Loading
Loading