diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..643f730 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: dschep/install-poetry-action@v1.2 + + - name: Install dependencies + run: poetry install + + - name: Code quality + run: poetry run pylint pytopsort + + - name: Check formatting + run: poetry run black . --check + + - name: Check types + run: poetry run pytest --mypy --mypy-ignore-missing-imports -s -v pytopsort/ tests/ + + - name: Run tests + run: poetry run pytest --cov=./pytopsort --cov-report=xml -s -v tests + + - name: Upload coverage + uses: codecov/codecov-action@v1