Skip to content

Commit

Permalink
Merge pull request #4188 from internetarchive/GitHub-Action-lint_pyth…
Browse files Browse the repository at this point in the history
…on.yml

GitHub Action to test Python code
  • Loading branch information
cdrini committed Dec 11, 2020
2 parents 212e5c0 + bcfa00e commit 29c3c72
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 50 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: python_tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
python_tests:
strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.8] # , 3.9]
runs-on: ubuntu-16.04 # Should match Dockerfile.olbase
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# https://lxml.de/installation.html#requirements
- run: sudo apt-get install libxml2-dev libxslt-dev
- run: pip install --upgrade pip setuptools wheel
- run: pip install -r requirements_test.txt
- run: pip list --outdated
- if: matrix.python-version == 3.8
run: make lint-diff
- run: make git
- run: make i18n
# Run legacy Python tests on legacy Infogami
- if: matrix.python-version < 3.0
run: make test-py && source scripts/run_doctests.sh
# Run both Py2 and Py3 tests on Infogami master
- run: pushd vendor/infogami && git pull origin master && popd
- run: make lint
- run: make test-py
- run: source scripts/run_doctests.sh
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

0 comments on commit 29c3c72

Please sign in to comment.