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 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 diff --git a/dateutil/easter.py b/dateutil/easter.py index 53b7c7893..f74d1f744 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,15 +21,15 @@ 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 - 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: 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