From 858f6a061b34d22095d64487684d751388d0ffad Mon Sep 17 00:00:00 2001 From: yuji38kwmt Date: Tue, 13 Aug 2024 15:40:26 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=83=88=E3=81=A8=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=81=AE=E5=AE=9F=E8=A1=8C=E3=82=92TravisCI?= =?UTF-8?q?=E3=81=8B=E3=82=89Github=20Actions=E3=81=AB=E7=A7=BB=E8=A1=8C?= =?UTF-8?q?=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82=20(#669)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * format * TravisCiの削除 * update lint-test * installの修正 * testの修正 --- .github/workflows/lint-test.yml | 49 +++++++++++++++++++++++++++++++++ .travis.yml | 34 ----------------------- 2 files changed, 49 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/lint-test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 00000000..1063f73e --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,49 @@ +name: Python tests and lint + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip "poetry<1.9" + poetry install --only main,test --all-extras + - name: Test + run: | + poetry run pytest tests/test_local*.py + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Install dependencies + run: | + python -m pip install --upgrade pip "poetry<1.9" + poetry install --only main,linter --all-extras + - name: Lint + run: | + make lint + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3b7cd16e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: ~> 1.0 -dist: focal -language: python - -install: - - pip install pip --upgrade - - pip install "poetry<1.8" - - travis_retry poetry install --only main,linter,test --all-extras - -script: - - pytest tests/test_local*.py - - -jobs: - include: - - python: 3.8 - - python: 3.9 - - python: 3.10 - - python: 3.11 - - python: 3.12 - script: - # 開発環境と同じPythonバージョンのみlintを実行する - - make lint - - -branches: - only: - - main - -env: - - PIP_DEFAULT_TIMEOUT=100 - -cache: pip -