This commit is contained in:
Yuta Hayashibe
2026-04-05 02:32:25 +00:00
committed by GitHub
4 changed files with 70 additions and 0 deletions

11
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,11 @@
<!--
Please format codes by ruff before pull request.
For example:
$ pip install -r ./requirements_dev.txt
$ make style
To test:
$ make test
-->

41
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: CI
on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
ci:
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create venv
run: |
python3 -m venv .venv
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements_dev.txt') }}
- name: Install dependencies
run: .venv/bin/pip install -r ./requirements_dev.txt
- name: Test
run: |
. .venv/bin/activate
make test

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
.PHONY: all
all:
.PHONY: style
style:
ruff format --respect-gitignore
.PHONY: test_style
test_style:
ruff format --respect-gitignore --check
.PHONY: test
test: test_style
.DELETE_ON_ERROR:
SHELL=/bin/bash

1
requirements_dev.txt Normal file
View File

@@ -0,0 +1 @@
ruff==0.3.4