| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,62 @@ | |||
| 1 | + # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
| 2 | + # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
| 3 | + | ||
| 4 | + name: Python package | ||
| 5 | + | ||
| 6 | + on: | ||
| 7 | + push: | ||
| 8 | + branches: [ master ] | ||
| 9 | + pull_request: | ||
| 10 | + branches: [ master ] | ||
| 11 | + | ||
| 12 | + jobs: | ||
| 13 | + build: | ||
| 14 | + | ||
| 15 | + runs-on: ubuntu-latest | ||
| 16 | + strategy: | ||
| 17 | + matrix: | ||
| 18 | + python-version: [3.4, 3.5, 3.6, 3.7, 3.8, nightly] | ||
| 19 | + | ||
| 20 | + steps: | ||
| 21 | + - uses: actions/checkout@v2 | ||
| 22 | + with: | ||
| 23 | + fetch-depth: 9999 | ||
| 24 | + - name: Set up Python ${{ matrix.python-version }} | ||
| 25 | + uses: actions/setup-python@v1 | ||
| 26 | + with: | ||
| 27 | + python-version: ${{ matrix.python-version }} | ||
| 28 | + - name: Install dependencies and prepare tests | ||
| 29 | + run: | | ||
| 30 | + python -m pip install --upgrade pip | ||
| 31 | + python --version; git --version | ||
| 32 | + git submodule update --init --recursive | ||
| 33 | + git fetch --tags | ||
| 34 | + | ||
| 35 | + pip install -r test-requirements.txt | ||
| 36 | + ./init-tests-after-clone.sh | ||
| 37 | + | ||
| 38 | + git config --global user.email "travis@ci.com" | ||
| 39 | + git config --global user.name "Travis Runner" | ||
| 40 | + # If we rewrite the user's config by accident, we will mess it up | ||
| 41 | + # and cause subsequent tests to fail | ||
| 42 | + cat git/test/fixtures/.gitconfig >> ~/.gitconfig | ||
| 43 | + - name: Lint with flake8 | ||
| 44 | + run: | | ||
| 45 | + pip install flake8 | ||
| 46 | + # stop the build if there are Python syntax errors or undefined names | ||
| 47 | + flake8 --ignore=W293,E265,E266,W503,W504,E731 --count --show-source --statistics | ||
| 48 | + - name: Coverage | ||
| 49 | + run: | | ||
| 50 | + pip install codecov | ||
| 51 | + ulimit -n 128 | ||
| 52 | + ulimit -n | ||
| 53 | + coverage run --omit="git/test/*" -m unittest --buffer | ||
| 54 | + coverage report | ||
| 55 | + - name: Documentation | ||
| 56 | + run: | | ||
| 57 | + pip install -r doc/requirements.txt | ||
| 58 | + make -C doc html | ||
| 59 | + - name: Test with pytest | ||
| 60 | + run: | | ||
| 61 | + pip install pytest | ||
| 62 | + pytest | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments