diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index c3f8da07f..86239497f 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -13,7 +13,7 @@ # platform and override the platform name manually via wheel's --plat-name # feature, to provide a platform-specific wheel for all platforms. -name: Test, Build & Publish +name: Build & Publish on: workflow_dispatch: @@ -24,30 +24,8 @@ on: default: 'master' jobs: - tests: - name: Run tests for ${{ matrix.os }} for ${{ matrix.python }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python: [3.6, 3.7, 3.8, 3.9] - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch }} - - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install test dependencies - run: python -m pip install tox - - name: Test - run: python -m tox -e py - macos-built-distributions: name: Build macOS wheels - needs: tests runs-on: macos-latest steps: - name: Checkout @@ -69,7 +47,6 @@ jobs: pure-built-distributions: name: Build pure wheels - needs: tests runs-on: ubuntu-latest steps: - name: Checkout @@ -92,7 +69,6 @@ jobs: path: ./dist/*.whl source-distribution: - needs: tests name: Build source distribution runs-on: ubuntu-latest steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..daa02a243 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,27 @@ +name: Tests + +on: + pull_request: + branches: '*' + +jobs: + tests: + name: Run tests for ${{ matrix.os }} for ${{ matrix.python }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python: [3.6, 3.7, 3.8, 3.9] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.branch }} + - name: Use Python ${{ matrix.python }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install test dependencies + run: python -m pip install tox + - name: Test + run: python -m tox -e py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 04d0b1f9e..000000000 --- a/.travis.yml +++ /dev/null @@ -1,161 +0,0 @@ -# Beta opt-in -# https://docs.travis-ci.com/user/build-config-validation#beta-opt-in -version: ~> 1.0 - -language: python -dist: xenial -os: linux - -env: - global: - - MAKEFLAGS="-j 2" - -jobs: - fast_finish: true - include: - - name: Python 3.6 on GNU/Linux - os: linux - python: "3.6" - env: - - TOXENV=py36 - # To help catch regression seen in #615 - - LC_ALL=C - - name: Python 3.7 on GNU/Linux - os: linux - python: "3.7" - env: TOXENV=py37 - - name: Python 3.8 on GNU/Linux - os: linux - python: "3.8" - env: TOXENV=py38 - - name: Python 3.9 on GNU/Linux - os: linux - python: "3.9" - env: TOXENV=py39 - - name: Python 3.10 on GNU/Linux - os: linux - python: nightly - env: TOXENV=py310 - - - name: PyPy 3.6 on GNU/Linux - os: linux - python: pypy3 - env: TOXENV=pypy3 - - - name: Python 3.6 on macOS - os: osx - language: shell - install: - - unset PYENV_ROOT - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - eval "$(pyenv init -)" - - pyenv install --skip-existing 3.6.12 - - pyenv global 3.6.12 - env: - - TOXENV=py36 - - PYENV_ROOT="$HOME/.pyenv/versions/3.6.12" - - PATH="$PYENV_ROOT/bin:$PATH" - - name: Python 3.7 on macOS - os: osx - language: shell - install: - - unset PYENV_ROOT - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - eval "$(pyenv init -)" - - pyenv install --skip-existing 3.7.9 - - pyenv global system 3.7.9 - env: - - TOXENV=py37 - - PYENV_ROOT="$HOME/.pyenv/versions/3.7.9" - - PATH="$PYENV_ROOT/bin:$PATH" - - name: Python 3.8 on macOS - os: osx - language: shell - install: - - unset PYENV_ROOT - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - eval "$(pyenv init -)" - - pyenv install --skip-existing 3.8.6 - - pyenv global system 3.8.6 - env: - - TOXENV=py38 - - PYENV_ROOT="$HOME/.pyenv/versions/3.8.6" - - PATH="$PYENV_ROOT/bin:$PATH" - - name: Python 3.9 on macOS - os: osx - language: shell - install: - - unset PYENV_ROOT - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - eval "$(pyenv init -)" - - pyenv install --skip-existing 3.9.0 - - pyenv global system 3.9.0 - env: - - TOXENV=py39 - - PYENV_ROOT="$HOME/.pyenv/versions/3.9.0" - - PATH="$PYENV_ROOT/bin:$PATH" - - name: Python 3.10 on macOS - os: osx - language: shell - install: - - unset PYENV_ROOT - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - eval "$(pyenv init -)" - - pyenv install --skip-existing 3.10-dev - - pyenv global system 3.10-dev - env: - - TOXENV=py310 - - PYENV_ROOT="$HOME/.pyenv/versions/3.10-dev" - - PATH="$PYENV_ROOT/bin:$PATH" - - - name: Python 3.6 on Windows - os: windows - language: shell - before_install: - - choco install python3 --version=3.6.8 - env: - - TOXENV=py36 - - export PATH="/c/Python36:/c/Python36/Scripts:$PATH" - - name: Python 3.7 on Windows - os: windows - language: shell - before_install: - - choco install python3 --version=3.7.9 - env: - - TOXENV=py37 - - export PATH="/c/Python37:/c/Python37/Scripts:$PATH" - - name: Python 3.8 on Windows - os: windows - language: shell - before_install: - - choco install python3 --version=3.8.6 - env: - - TOXENV=py38 - - export PATH="/c/Python38:/c/Python38/Scripts:$PATH" - - name: Python 3.9 on Windows - os: windows - language: shell - before_install: - - choco install python3 --version=3.9.0 - env: - - TOXENV=py39 - - export PATH="/c/Python39:/c/Python39/Scripts:$PATH" - - name: Python 3.10 on Windows - os: windows - language: shell - before_install: - - choco install python3 --pre - env: - - TOXENV=py310 - - export PATH="/c/Python310:/c/Python310/Scripts:$PATH" - -before_script: - - python -V - - python -m pip install -U pip tox - - python -m tox --notest # Note: keep it! - -script: - - python -m tox - -notifications: - email: false diff --git a/README.rst b/README.rst index ff0df26f2..35288d529 100755 --- a/README.rst +++ b/README.rst @@ -1,8 +1,7 @@ Watchdog ======== -.. image:: https://travis-ci.org/gorakhargosh/watchdog.svg?branch=master - :target: https://travis-ci.org/gorakhargosh/watchdog +|Build Status| Python API and shell utilities to monitor file system events. @@ -299,3 +298,6 @@ to do: .. _treewalker: http://github.com/jbd/treewatcher .. _file.monitor: http://github.com/pke/file.monitor .. _pyfilesystem: http://code.google.com/p/pyfilesystem + +.. |Build Status| image:: https://github.com/gorakhargosh/watchdog/workflows/Tests/badge.svg + :target: https://github.com/gorakhargosh/watchdog/actions?query=workflow%3ATests diff --git a/changelog.rst b/changelog.rst index 2eb587dbc..c7c7f8f9d 100644 --- a/changelog.rst +++ b/changelog.rst @@ -9,7 +9,8 @@ Changelog 2021-02-xx • `full history `__ - [mac] Fix a segmentation fault when dealing with unicode paths (`#763 `_) -- Thanks to our beloved contributors: @SamSchott +- Moved the CI from Travis-CI to GitHub Actions (`#764 `_) +- Thanks to our beloved contributors: @SamSchott, @BoboTiG 2.0.0