From 41e821980c4db9ac3adfc342e452c855ad5d6462 Mon Sep 17 00:00:00 2001 From: Daniel Lemm <61800298+ffe4@users.noreply.github.com> Date: Tue, 31 Mar 2020 11:28:03 +0200 Subject: [PATCH 1/5] Add GHA workflow for PyPy tests --- .github/workflows/test_pypy.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/test_pypy.yml diff --git a/.github/workflows/test_pypy.yml b/.github/workflows/test_pypy.yml new file mode 100644 index 000000000..e2b186925 --- /dev/null +++ b/.github/workflows/test_pypy.yml @@ -0,0 +1,50 @@ +name: PyPy + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + strategy: + matrix: + python-version: [pypy2, pypy3] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + env: + TOXENV: py + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: python -m pip install -U tox + - name: Install zic (Windows) + run: | + curl https://get.enterprisedb.com/postgresql/postgresql-9.5.21-2-windows-x64-binaries.zip --output $env:GITHUB_WORKSPACE\postgresql9.5.21.zip + unzip -oq $env:GITHUB_WORKSPACE\postgresql9.5.21.zip -d .postgresql + if: runner.os == 'Windows' + - name: Run updatezinfo.py (Windows) + run: | + $env:Path += ";$env:GITHUB_WORKSPACE\.postgresql\pgsql\bin" + ci_tools/retry.bat python updatezinfo.py + if: runner.os == 'Windows' + - name: Run updatezinfo.py (Unix) + run: ./ci_tools/retry.sh python updatezinfo.py + if: runner.os != 'Windows' + - name: Run tox + run: python -m tox + - name: Generate coverage.xml + run: python -m tox -e coverage + - name: Report coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./.tox/coverage.xml + name: ${{ matrix.os }}:${{ matrix.python-version }} + fail_ci_if_error: true From 9d909b015cb8a254bf6d6db2e57a5cfb2d22aec3 Mon Sep 17 00:00:00 2001 From: Daniel Lemm <61800298+ffe4@users.noreply.github.com> Date: Tue, 31 Mar 2020 11:31:39 +0200 Subject: [PATCH 2/5] Update tox.ini to run on Windows Commands were invoked without `python -m`, failing on Windows CI. --- tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index b1b7a1b78..c13812385 100644 --- a/tox.ini +++ b/tox.ini @@ -34,16 +34,16 @@ deps = coverage skip_install = True changedir = {toxworkdir} setenv = COVERAGE_FILE=.coverage -commands = coverage erase - coverage combine - coverage report --rcfile={toxinidir}/tox.ini - coverage xml +commands = python -m coverage erase + python -m coverage combine + python -m coverage report --rcfile={toxinidir}/tox.ini + python -m coverage xml [testenv:codecov] description = [only run on CI]: upload coverage data to codecov (depends on coverage running first) deps = codecov skip_install = True -commands = codecov --file {toxworkdir}/coverage.xml +commands = python -m codecov --file {toxworkdir}/coverage.xml [testenv:dev] description = DEV environment From a17d24e0880d986df54de9e8ad962ad65d4fff8b Mon Sep 17 00:00:00 2001 From: Daniel Lemm <61800298+ffe4@users.noreply.github.com> Date: Tue, 31 Mar 2020 11:35:06 +0200 Subject: [PATCH 3/5] Remove PyPy jobs from Travis --- .travis.yml | 9 ++------- changelog.d/1020.misc.rst | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 changelog.d/1020.misc.rst diff --git a/.travis.yml b/.travis.yml index ec3bb48d2..7034ab475 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,7 @@ python: - "3.7" - "3.8" - "nightly" - - "pypy" - - "pypy3.5" - - "pypy3.6" -env: - TOXENV=py +env: TOXENV=py matrix: fast_finish: true @@ -20,7 +16,7 @@ matrix: - python: 3.3 # This is required to run Python 3.3 on Travis dist: trusty - env: TOXENV=py33 # Needed because "py" won't invoke testenv:py33 + env: TOXENV=py33 # Needed because "py" won't invoke testenv:py33 - python: 3.6 env: TOXENV=docs - python: 3.6 @@ -29,7 +25,6 @@ matrix: env: TOXENV=build allow_failures: - python: "nightly" - - python: "pypy3.6" install: - | diff --git a/changelog.d/1020.misc.rst b/changelog.d/1020.misc.rst new file mode 100644 index 000000000..1a4b36192 --- /dev/null +++ b/changelog.d/1020.misc.rst @@ -0,0 +1 @@ +Migrate PyPy CI from Travis to Github Actions. (gh issue #1019) \ No newline at end of file From 40c41c0fb34b28dc271ad6110a381222a17ce1f2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 4 Apr 2020 16:41:20 +0300 Subject: [PATCH 4/5] Fix Easter typos --- dateutil/easter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dateutil/easter.py b/dateutil/easter.py index 53b7c7893..e26faba01 100644 --- a/dateutil/easter.py +++ b/dateutil/easter.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -This module offers a generic easter computing method for any given year, using +This module offers a generic Easter computing method for any given year, using Western, Orthodox or Julian algorithms. """ @@ -21,7 +21,7 @@ def easter(year, method=EASTER_WESTERN): quoted in "Explanatory Supplement to the Astronomical Almanac", P. Kenneth Seidelmann, editor. - This algorithm implements three different easter + This algorithm implements three different Easter calculation methods: 1 - Original calculation in Julian calendar, valid in From d6820442551834085a385729050e3c53143cef2a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 4 Apr 2020 16:55:05 +0300 Subject: [PATCH 5/5] Fix numbered list formatting --- dateutil/easter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dateutil/easter.py b/dateutil/easter.py index e26faba01..f74d1f744 100644 --- a/dateutil/easter.py +++ b/dateutil/easter.py @@ -24,12 +24,12 @@ def easter(year, method=EASTER_WESTERN): This algorithm implements three different Easter calculation methods: - 1 - Original calculation in Julian calendar, valid in - dates after 326 AD - 2 - Original method, with date converted to Gregorian - calendar, valid in years 1583 to 4099 - 3 - Revised method, in Gregorian calendar, valid in - years 1583 to 4099 as well + 1. Original calculation in Julian calendar, valid in + dates after 326 AD + 2. Original method, with date converted to Gregorian + calendar, valid in years 1583 to 4099 + 3. Revised method, in Gregorian calendar, valid in + years 1583 to 4099 as well These methods are represented by the constants: