mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Try to add Github Actions
This commit is contained in:
67
.github/workflows/ci.yml
vendored
Normal file
67
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
# Set the type of machine to run on
|
||||
runs-on: [ubuntu-20.04, windows-2019]
|
||||
strategy:
|
||||
matrix:
|
||||
environment: ['3.8', '3.9', '3.7', '3.6', 'interpreter']
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: 'pip install .[testing]'
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
if: ${{ matrix.environment != 'interpreter' }}
|
||||
with:
|
||||
python-version: ${{ matrix.interpreter }}
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Run tests
|
||||
run: pytest
|
||||
env:
|
||||
JEDI_TEST_ENVIRONMENT: ${{ matrix.environment }}
|
||||
|
||||
code-quality:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: 'pip install .[qa]'
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
flake8 jedi setup.py
|
||||
mypy jedi sith.py'
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: 'pip install .[testing] coverage'
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
coverage run --source jedi -m pytest
|
||||
coverage report
|
||||
|
||||
- name: Upload coverage data
|
||||
run: |
|
||||
pip install --quiet codecov coveralls
|
||||
coverage xml
|
||||
coverage report -m
|
||||
coveralls
|
||||
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -X search -X fix -X xcode -f coverage.xml
|
||||
@@ -100,7 +100,9 @@ def environment(request):
|
||||
if request.config.option.interpreter_env or version == 'interpreter':
|
||||
return InterpreterEnvironment()
|
||||
|
||||
return get_system_environment(version[0] + '.' + version[1:])
|
||||
if '.' not in version:
|
||||
version = version[0] + '.' + version[1:]
|
||||
return get_system_environment(version)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
|
||||
Reference in New Issue
Block a user