diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..ca5c44b3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,58 @@ +name: Python package + +on: [release] + +jobs: + + documents: + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + python -m pip install -r requirements/docs.txt + - name: Deploy documents + env: + GH_TOKEN: ${{ secrets.GH_DEPLOY_KEY }} + GH_USER: ${{ secrets.GH_USER }} + GH_EMAIL: ${{ secrets.GH_EMAIL }} + run: | + git config user.name ${GH_USER} + git config user.email "${GH_EMAIL}" + git remote add gh-token "https://${GH_TOKEN}@github.com/facelessuser/Rummage.git" + git fetch gh-token && git fetch gh-token gh-pages:gh-pages + python -m mkdocs gh-deploy -v --clean --remote-name gh-token + git push gh-token gh-pages + + sdist: + strategy: + matrix: + python-version: [3.7] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Package + run: | + pip install --upgrade setuptools + python setup.py sdist + - name: Publish + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_PWD }} diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 00000000..0c0d7b8e --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,84 @@ +name: Python package + +on: [push] + +jobs: + tests: + strategy: + fail-fast: false + max-parallel: 4 + matrix: + platform: [ubuntu-latest, windows-latest] + python-version: [3.5, 3.6, 3.7] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools tox coverage codecov + python -m pip install -r requirements/test.txt + python -m pip install -r requirements/test-project.txt + python -m pip install -r requirements/setup.txt + - name: Test with pytest + run: | + python -m pytest --cov rummage --cov-append tests + python -m coverage html -d coverage + python -m coverage report --show-missing + - name: Coverage Report + if: success() + run: | + python -m codecov -t ${{ secrets.CODECOV_TOKEN }} + + lint: + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + python -m pip install -r requirements/lint.txt + - name: Lint + run: | + python -m flake8 . + + documents: + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + python -m pip install -r requirements/docs.txt + - name: Install Aspell + run: | + sudo apt-get install aspell aspell-en + - name: Build documents + run: | + python -m mkdocs build --clean --verbose --strict + python -m pyspelling diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d7c5d77..00000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -sudo: required - -language: python - -matrix: - include: - - python: 3.5 - env: TOXENV=py35 - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - dist: xenial - env: TOXENV=py37 - - python: 3.7 - env: TOXENV=lint - - python: 3.7 - env: TOXENV=documents - -addons: - apt: - packages: - - aspell - - aspell-en - -install: -- pip install tox -- pip install codecov - -script: -- tox - -after_success: -- codecov - -deploy: - - provider: pypi - user: facelessuser - server: https://upload.pypi.org/legacy/ - password: - secure: TeUXiC/VhswWSbqyEjsRkAN7UaSxTsA8Y7SxD4/YNLBpTZ4mnunzwBKEuDCCjjiEggaENNkpK9QEsRsDlkLlTfSo3iHo9EwovOTHy1qcAdkE/Qwfsq+Hr1cxj36L7gY0dWAg0HIXvF8XTDb/MouYG7V6hIagHMPLWMxyjuH1yGWNN54GRtUr8ot8lqaShYP32PufqKosg73kR174cZrSdQI3taUvgCl0Dr7KA3kc3dSB2Qh4cY55q060OYp9c7sYV5e7gP21B5vdMy99VnFEJ+86axkjG5I65yBBGKiVoun8jPIm+qsVY1sWYM/G9mezEftxNjqntP0/pnVJGy/x2Zf7zYAYuXvKctwUCt0p5lcvo2//oi/y69QuFu2iWiycsnsu1FyJk9nPMgKsGFO9n6j1RIztiWNxt5MueGNlbGx7eVGdb15LH5LucpPp3FWu2DYJtO71tU1tvJ5qpP97fGWrfRnhQiWa0NS0S/qgZFcaAiY6bSzyJ/Dt8nriPm4S+dMKPKX8vWtib3TxjmU3XySTQbrlQhfkH5vqv2gRFQB6+Eidr7/J0lYAfKWXzSYoPEXyFuFpmpf4XW7DvQLoWiWPFhKvq7zUiZZIu0Q5mBCx0WHMB6tTQuAoNes7zXsrexwc8AAkSsZbb48rQ82wPpeXBSPPmyHxumvoK5EFLNc= - distributions: sdist - skip_upload_docs: true - on: - tags: true - repo: facelessuser/Rummage - condition: $TOXENV = documents - - provider: pages - github_token: $GITHUB_TOKEN - name: $GITHUB_USER - email: $GITHUB_EMAIL - skip_cleanup: true - local_dir: site - on: - tags: true - repo: facelessuser/Rummage - condition: $TOXENV = documents diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 37ea51c5..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,34 +0,0 @@ -build: false - -environment: - matrix: - - PYTHON: "C:/Python35" - TOXENV: "py35" - - PYTHON: "C:/Python36" - TOXENV: "py36" - - PYTHON: "C:/Python37" - TOXENV: "py37" - - PYTHON: "C:/Python37" - TOXENV: "lint" - -init: - - "ECHO %TOXENV%" - - "ECHO %PYTHON%" - - ps: "ls C:/Python*" - -install: - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - - "python -m pip install -U pip setuptools wheel" - - "python -m pip install -U virtualenv tox codecov" - -test_script: - - pip --version - - virtualenv --version - - tox --version - - tox - -after_test: - - if not ("%TOXENV%" == "lint") if not ("%TOXENV%" == "documents") codecov - -matrix: - fast_finish: true