diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 98e3dcd..2b0a94f 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python 3.13 + uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.13 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/python-package-36.yml b/.github/workflows/python-package-36.yml new file mode 100644 index 0000000..801aafd --- /dev/null +++ b/.github/workflows/python-package-36.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: ['3.6'] + + 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 + pip install .[lint,test] + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 atcoder tests --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 atcoder tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Type check with mypy + run: | + mypy atcoder tests + - name: Test with pytest + run: | + pytest diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 553dfd5..b8bd426 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,12 +14,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/setup.cfg b/setup.cfg index 5c1660f..1e476e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,7 @@ packages = find: [options.extras_require] lint = flake8 - pep8-naming + pep8-naming; python_version>="3.8" mypy test = pytest