From 259e75530a04c17c6a6042f81f69991e4cfd3155 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Fri, 22 Nov 2024 17:22:16 +0900 Subject: [PATCH] Cleanup github ci --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++--- .github/workflows/lint.yml | 34 ---------------------------------- 2 files changed, 26 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d137b28..43ad02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,29 @@ on: pull_request: jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + submodules: true + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install -e .[test] + - name: Lint + run: | + make lint + - name: Mypy + run: | + make mypy build: runs-on: ubuntu-latest strategy: @@ -27,10 +50,10 @@ jobs: run: | pip install setuptools pip install .[all] + pip install .[test] - name: Test run: | - pip install pytest - pytest -vsx tests + make test - name: Run examples run: | python getting_started.py @@ -41,6 +64,6 @@ jobs: done - name: Install from dist run: | - python -m build + make build pip install dist/*.tar.gz pip install dist/*.whl diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index fe63daa..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: lint - -on: - push: - branches: - - main - pull_request: - -jobs: - lint: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9] - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - submodules: true - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -r requirements-dev.txt - - name: Lint - run: | - ruff format --check - ruff check - - name: Mypy - run: | - pip install mypy types-PyYAML - mypy -p imgviz --ignore-missing-imports