56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
name: Python CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
pull_request_target:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.8]
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
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
|
|
pip install -r requirements.txt
|
|
|
|
- name: Lint with flake8
|
|
continue-on-error: false
|
|
run: flake8
|
|
|
|
- name: Check black formatting
|
|
continue-on-error: false
|
|
run: black . --check
|
|
|
|
- name: Check isort formatting
|
|
continue-on-error: false
|
|
run: isort . --check
|
|
|
|
- name: Run unittest tests with coverage
|
|
run: |
|
|
pytest --cov=autogpt --without-integration --without-slow-integration
|
|
|
|
- name: Generate coverage report
|
|
run: |
|
|
coverage report
|
|
coverage xml
|