diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..267dc98 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: PyPi Release + +on: + release: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install gettext + run: sudo apt-get install gettext -y + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel twine + - name: Build dist packages + run: python setup.py sdist bdist_wheel + - name: Upload packages + run: twine upload dist/* + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..17f8f14 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,30 @@ +name: Tests + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.5, 3.6, 3.7] + django-version: [1.11.*, 2.2.*] + + steps: + - uses: actions/checkout@v1 + - 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 + pip install django==${{ matrix.django-version }} + - name: Test with pytest + run: python setup.py test + - name: Codecov + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d44615a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: python -dist: xenial -cache: pip -python: -- '3.6' -- '3.7' -env: - matrix: - - DJANGO=111 - - DJANGO=22 - - DJANGO=master -matrix: - fast_finish: true - allow_failures: - - env: DJANGO=master -install: -- pip install --upgrade pip tox codecov -before_script: -- | - if [[ -z $TOXENV ]]; then - export TOXENV=py$(echo $TRAVIS_PYTHON_VERSION | sed -e 's/\.//g')-dj$DJANGO - fi -- echo $TOXENV -script: -- tox -e $TOXENV -after_success: -- codecov -deploy: - provider: pypi - user: codingjoe - password: - secure: dnmVaqnmG6mSrmI9q6nL2l0aGkX56+WAsqdT/J1O2hBpFBOE4NiqH+2ryIqZj1wrvHZ72/jjyT5Xi1MWYxwDtDfkBIp+juHUGPbFfGy3J7EVgGkmf38E5SC2Q9IHc3A1iHxTZAX3o816TP3bt5vwGll3UzSMiaaPRQ/AiK4+og4= - on: - tags: true - distributions: compile_translations sdist bdist_wheel - repo: codingjoe/django-stdimage