From ff78f28fec0b95c368030c8b76175ec47a3d0fa4 Mon Sep 17 00:00:00 2001 From: "dev.takaya.inoue" Date: Thu, 26 Feb 2026 04:01:50 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20PR=E7=94=A8=20qa-gate=20(lint/test/build)?= =?UTF-8?q?=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/qa_gate.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/qa_gate.yml diff --git a/.github/workflows/qa_gate.yml b/.github/workflows/qa_gate.yml new file mode 100644 index 0000000..466be7c --- /dev/null +++ b/.github/workflows/qa_gate.yml @@ -0,0 +1,43 @@ +name: QA Gate + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: qa-gate-${{ github.ref }} + cancel-in-progress: true + +jobs: + qa-gate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: lint + run: | + python -m compileall -q . + + - name: test + run: | + if [ -d tests ]; then + python -m unittest discover -s tests -p "test*.py" + else + echo "tests directory not found; skip" + fi + + - name: build + run: | + if [ -f pyproject.toml ]; then + python -m pip install --upgrade pip + python -m pip install build + python -m build --sdist --wheel --outdir /tmp/dist . + else + echo "pyproject.toml not found; skip" + fi