diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..17249ed9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + pull_request: + push: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.0 + tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"] + steps: + - uses: "actions/checkout@v2" + with: + # some tests work on the git history so we need all of it! + fetch-depth: 0 + - uses: "actions/setup-python@v2" + with: + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" + run: python -m pip install tox tox-gh-actions + - name: "Run tox targets for ${{ matrix.python-version }}" + run: python -m tox + - name: Coveralls + if: ${{ matrix.python-version != 2.7 }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + python -m pip install coveralls + coveralls diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c601e89..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: python -cache: - directories: - - $HOME/.cache/pip - - $HOME/.cache/pre-commit - -python: - - "2.7" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - -matrix: - include: - - python: 3.8 - env: TOXENV=check_readme - - python: 3.8 - env: TOXENV=pre_commit - -install: - - pip install tox-travis - - pip install coveralls - # some tests work on the git history so we need all of it! - - git fetch --unshallow - -script: - - tox - -after_success: - - coveralls - -deploy: - provider: pypi - user: acsbidoul - password: - secure: yhZ4NU2E76ytzVNVhIB7FgE/kpbvzE5zXucKOzCE/W3BlYn+bg2qeWXjAjKghe3wN2TwpHiQVMv9R4EXfGWIAS4myQRfv+mAuAIV07AFM1r1kjcrSz13J5NMpNHbhh+8mHC3VBgu/HGFiORAGu396W/BhbkyyUb9ZNS8tzXWuSIqEz1V5A3ZTJBypG3ROvXLArRJ4G9nssDDDhzQW9q2MnWzSUqBVm6vp2g3EBNDJtBBrVTXDgT9RpI1pcCeoKm2qidDPnjiTCWdtYV5CBnj8p2Q15oKdG8ccN04PGRThARnNzG3/A+Z0RlHdOh7bOfNc3sPXy3OrTvj7qKDBS51TjrfWxR5hxtc0NfMMBSShBZ50m0QRCqzkPI1wJeDESVLflA+HT+W89L/tERo/HR4NwIF1ap0nurrBq7g/8Vq9tWLffOJBa6db4GX9wTStcPwbL/PqQ80H1Y+5yn+nKVtwYA1jwBPy9MMovKLYMKjpUn4IVrGlmfHHpXPAPIBQaNnekN0uEvTszbki7YZpLnxNqCFjXN11cGBwX6hJ6N/C6ZAK151eWGrjFFmJ34U3Qe0PoCRIzYTH7g47vvawvUQRO3zQDzM4GLZ0rtf1x1TTkH+D1o5oI1iQ8XVNuIxsm2XwDF6pnFlf7/9DDR3GY3UmmLg+D3Ph3FjE23uxO77Ejg= - distributions: "sdist bdist_wheel" - skip_upload_docs: true - on: - repo: acsone/setuptools-odoo - branch: master - tags: true - python: 2.7 diff --git a/tox.ini b/tox.ini index bb6f00d1..64ce3036 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,15 @@ envlist = py39 check_readme +[gh-actions] +python = + 2.7: py27 + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38, check_readme + 3.9: py39 + [testenv] skip_missing_interpreters = True usedevelop = True