diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c115c43 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Test + +on: [push, pull_request] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"] + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + sudo apt-get install libsane-dev + + # No tests: just check it can build and install + - name: Test build and install + shell: bash + run: | + python setup.py build + python setup.py install + + - name: Lint + shell: bash + run: | + pip install pycodestyle pyflakes + pycodestyle --statistics --count . || true + pyflakes . | tee >(wc -l) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 17648d2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -dist: xenial -language: python - -addons: - apt: - packages: - - libsane-dev - -# No tests: just check it can build and install -script: - - python setup.py build - - python setup.py install - -after_script: - - pip install pycodestyle pyflakes - - pycodestyle --statistics --count . - - pyflakes . | tee >(wc -l) - -matrix: - fast_finish: true - include: - - python: pypy3 - - python: 3.6 - - python: 3.7 - - python: 3.8 - - python: 3.9 \ No newline at end of file