name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Cache Poetry installation uses: actions/cache@v4 with: path: | ~/.local ~/.cache/pypoetry key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} restore-keys: | poetry-${{ runner.os }}- - name: Install Poetry run: | curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Install dependencies run: | poetry install - name: Run tests run: | poetry run pytest tests/ -v --tb=short - name: Run linting run: | poetry run ruff check codechunk/ tests/ - name: Run type checking run: | poetry run mypy codechunk/ tests/ # End of CI workflow