diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..42ea99ce --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI +concurrency: + group: check-${{ github.ref }} + cancel-in-progress: true +on: + push: + branches: + - master + tags: + - v* + pull_request: + branches: + - master +jobs: + test: + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: + - ubuntu-latest + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v4 + with: + python-version: '${{ matrix.python-version }}' + cache: pip + - run: pip install coveralls tox tox-gh + - run: tox + - run: coveralls + continue-on-error: true + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + cache: pip + - run: make install # TODO: this should only install lint dependencies + - run: make lint diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 712a707b..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -before_script: - - pip install --upgrade pip setuptools - - pip install --upgrade .[test] - -.before_script_alpine: &before_alpine - before_script: - - apk add --no-cache openssl gcc libxml2 libxml2-dev libxslt libxslt-dev libffi libffi-dev musl-dev libjpeg-turbo libjpeg-turbo-dev cairo cairo-dev - - pip install --upgrade pip setuptools - - pip install --upgrade .[test] - - -.test_template: &test - script: - - py.test pygal/ --flake8 --cov-report= --cov=pygal - - -python 2.7alpine: - image: python:2.7-alpine - <<: *before_alpine - <<: *test - -# Broken symbolic link with alpine : -# https://github.com/docker-library/python/issues/155 - -python 3.3alpine: - image: python:3.3-alpine - <<: *before_alpine - <<: *test - -python 3.4alpine: - image: python:3.4-alpine - <<: *before_alpine - <<: *test - -python 3.5alpine: - image: python:3.5-alpine - <<: *before_alpine - <<: *test - -python 3.6alpine: - image: python:3.6-alpine - <<: *before_alpine - <<: *test - -python pypy: - image: pypy:2 - <<: *test - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c023e45..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: python -dist: focal -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - 3.10.0 - #- nightly - -install: - - make install - -script: - - make lint - - make check - -after_success: coveralls - -sudo: false diff --git a/tox.ini b/tox.ini index cc7e47f7..0652ee75 100644 --- a/tox.ini +++ b/tox.ini @@ -17,4 +17,11 @@ setenv = commands = coverage run --source=pygal {envbindir}/py.test {posargs:pygal/test} --junitxml=junit-{envname}.xml coverage xml -o coverage-{envname}.xml - flake8 pygal + +[gh] +python = + 3.12 = py312 + 3.11 = py311, type + 3.10 = py310 + 3.9 = py39 + 3.8 = py38