mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
Travis CI -> GitHub Actions
This commit is contained in:
68
.github/workflows/build.yml
vendored
Normal file
68
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTEST_ADDOPTS: --color=yes
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
pip install .[qa]
|
||||||
|
- name: Run Flake8
|
||||||
|
# Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong.
|
||||||
|
run: flake8 --extend-ignore F401 parso test/*.py setup.py scripts/
|
||||||
|
- name: Run Mypy
|
||||||
|
run: mypy parso
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: ${{ matrix.experimental }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python-version: ['3.6', '3.7', '3.8', '3.9']
|
||||||
|
experimental: [false]
|
||||||
|
include:
|
||||||
|
- python-version: '3.10-dev'
|
||||||
|
experimental: true
|
||||||
|
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 setuptools wheel
|
||||||
|
pip install .[testing]
|
||||||
|
- name: Run pytest
|
||||||
|
run: pytest
|
||||||
|
coverage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
pip install .[testing] coverage
|
||||||
|
- name: Run pytest with coverage
|
||||||
|
run: |
|
||||||
|
coverage run -m pytest
|
||||||
|
coverage report
|
||||||
|
- name: Upload coverage report
|
||||||
|
run: |
|
||||||
|
pip install --quiet coveralls
|
||||||
|
coveralls
|
||||||
31
.travis.yml
31
.travis.yml
@@ -1,31 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: python
|
|
||||||
python:
|
|
||||||
- 3.6
|
|
||||||
- 3.7
|
|
||||||
- 3.8.2
|
|
||||||
- nightly
|
|
||||||
matrix:
|
|
||||||
allow_failures:
|
|
||||||
- python: nightly
|
|
||||||
include:
|
|
||||||
- python: 3.8
|
|
||||||
install:
|
|
||||||
- 'pip install .[qa]'
|
|
||||||
script:
|
|
||||||
# Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong.
|
|
||||||
- 'flake8 --extend-ignore F401 parso test/*.py setup.py scripts/'
|
|
||||||
- mypy parso
|
|
||||||
- python: 3.8.2
|
|
||||||
script:
|
|
||||||
- 'pip install coverage'
|
|
||||||
- 'coverage run -m pytest'
|
|
||||||
- 'coverage report'
|
|
||||||
after_script:
|
|
||||||
- |
|
|
||||||
pip install --quiet coveralls
|
|
||||||
coveralls
|
|
||||||
install:
|
|
||||||
- pip install .[testing]
|
|
||||||
script:
|
|
||||||
- pytest
|
|
||||||
@@ -3,9 +3,9 @@ parso - A Python Parser
|
|||||||
###################################################################
|
###################################################################
|
||||||
|
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/davidhalter/parso.svg?branch=master
|
.. image:: https://github.com/davidhalter/parso/workflows/Build/badge.svg?branch=master
|
||||||
:target: https://travis-ci.org/davidhalter/parso
|
:target: https://github.com/davidhalter/parso/actions
|
||||||
:alt: Travis CI build status
|
:alt: GitHub Actions build status
|
||||||
|
|
||||||
.. image:: https://coveralls.io/repos/github/davidhalter/parso/badge.svg?branch=master
|
.. image:: https://coveralls.io/repos/github/davidhalter/parso/badge.svg?branch=master
|
||||||
:target: https://coveralls.io/github/davidhalter/parso?branch=master
|
:target: https://coveralls.io/github/davidhalter/parso?branch=master
|
||||||
|
|||||||
@@ -34,5 +34,5 @@ easy as::
|
|||||||
|
|
||||||
python3.9 -m pytest
|
python3.9 -m pytest
|
||||||
|
|
||||||
Tests are also run automatically on `Travis CI
|
Tests are also run automatically on `GitHub Actions
|
||||||
<https://travis-ci.org/davidhalter/parso/>`_.
|
<https://github.com/davidhalter/parso/actions>`_.
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ Resources
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
- `Source Code on Github <https://github.com/davidhalter/parso>`_
|
- `Source Code on Github <https://github.com/davidhalter/parso>`_
|
||||||
- `Travis Testing <https://travis-ci.org/davidhalter/parso>`_
|
- `GitHub Actions Testing <https://github.com/davidhalter/parso/actions>`_
|
||||||
- `Python Package Index <http://pypi.python.org/pypi/parso/>`_
|
- `Python Package Index <http://pypi.python.org/pypi/parso/>`_
|
||||||
|
|||||||
Reference in New Issue
Block a user