diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2020-12-25 07:50:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-25 07:50:13 +0100 |
| commit | cc06903868813e2a48e402cdd63b93ad14afa37e (patch) | |
| tree | 8b408321f73cabff8add870b1cf24cce77dd0395 | |
| parent | 54dc3a2a98e4bf0e73be74b8d6b32f85be709f96 (diff) | |
| download | python-decorator-git-cc06903868813e2a48e402cdd63b93ad14afa37e.tar.gz | |
Create python-package.yml
| -rw-r--r-- | .github/workflows/python-package.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..49abd22 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: decorator + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['2.7', '3.5', '3.6', '3.7', '3.8'] + + 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: | + python -m pip install --upgrade pip + python -m pip install flake8 + python -m pip install -e . + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + python src/tests/test.py -v |
