Skip to content

Commit

Permalink
publish yaylib 1.5.0 beta 1 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekkx authored Sep 2, 2024
2 parents e4240ad + f050519 commit ea4d6df
Show file tree
Hide file tree
Showing 56 changed files with 822 additions and 545 deletions.
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

0 comments on commit ea4d6df

Please sign in to comment.