From e505a5dfba0084e6159d6ea8877523f4639d2360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Mon, 24 Jun 2024 09:52:04 -0300 Subject: [PATCH] Update Python version installed for GitHub Actions --- .github/workflows/docs.yml | 8 ++++---- .github/workflows/pythonapp.yml | 12 +++++------- pyproject.toml | 7 +++++++ requirements_docs.txt | 2 ++ 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 requirements_docs.txt diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9254092..7e015ac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,16 +6,16 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 - name: Install dependencies run: | - pip install sphinx sphinx_rtd_theme + pip install -r requirements_docs.txt - name: Sphinx build run: | sphinx-build -b html docs/source docs/build/html - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/testing' }} with: diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index ee03f7e..c00f320 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -18,23 +18,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . + pip install '.[dev]' - name: Lint with flake8 run: | - pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pip install pytest pytest diff --git a/pyproject.toml b/pyproject.toml index 755cc96..9fa3c66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,3 +17,10 @@ authors = [ ] description = "Bot de telegram para organizar pycamp" readme = "README.md" + +[project.optional-dependencies] +dev = [ + "flake8==7.1.0", + "freezegun==1.5.1", + "pytest==8.2.2", +] diff --git a/requirements_docs.txt b/requirements_docs.txt new file mode 100644 index 0000000..532e7d4 --- /dev/null +++ b/requirements_docs.txt @@ -0,0 +1,2 @@ +sphinx==7.3.7 +sphinx_rtd_theme==2.0.0 \ No newline at end of file