name: Python CI on: push: branches: - master pull_request: jobs: lint: name: Lint runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install Poetry run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install dependencies run: poetry install --no-root - name: Run Ruff run: | poetry run ruff check poetry run ruff format --check test: name: Test runs-on: ubuntu-latest needs: lint steps: - name: Checkout code uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install Poetry run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install dependencies run: poetry install --no-root - name: Run Tests run: poetry run pytest -v --cov=. --cov-report=xml - name: Upload coverage to Codecov run: bash <(curl -s https://codecov.io/bash) env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}