Skip to content

Conversation

Copy link

Copilot AI commented Jan 20, 2026

Overview

This PR adds a .github/workflows/copilot-setup-steps.yml workflow file to configure the development environment for GitHub Copilot coding agents.

Changes

The workflow file provides automated setup for the development environment with the following features:

Workflow Triggers:

  • Manual execution via workflow_dispatch through the repository's Actions tab
  • Automatic validation when the workflow file itself is modified (via push and pull_request triggers with path filtering)

Environment Setup:

  • Uses Python 3.12 for consistency with the project's testing matrix
  • Installs essential development tools via pip:
    • tox - for running all project commands consistently
    • tox-uv - for faster tox environment creation
    • pre-commit - for code quality checks
  • Configures pre-commit git hooks automatically

Security & Best Practices:

  • Minimal permissions (contents: read) following the principle of least privilege
  • Uses latest GitHub Actions versions (actions/checkout@v6, actions/setup-python@v5)
  • Includes comprehensive inline documentation explaining configuration choices
  • Job name follows Copilot requirements (copilot-setup-steps)

The workflow aligns with the development tools documented in AGENTS.md and the dependency groups defined in pyproject.toml.

Original prompt

Overview

Add a .github/workflows/copilot-setup-steps.yml file to configure the development environment setup for GitHub Copilot coding agent.

Requirements

Based on the AGENTS.md file, the workflow should install the following development tools:

  1. tox - The project uses tox for running all commands consistently
  2. tox-uv - Used for faster environment creation with tox
  3. pre-commit - Used for running pre-commit hooks on code

Implementation Details

Create a new file at .github/workflows/copilot-setup-steps.yml that:

  1. Sets up Python (use a recent stable version like 3.12)
  2. Installs the required dev tools via pip:
    • tox
    • tox-uv
    • pre-commit
  3. Optionally runs pre-commit install to set up the git hooks

The workflow should follow the standard Copilot setup steps format. Example structure:

name: "Copilot Setup Steps"

on: workflow_dispatch

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install dev tools
        run: |
          pip install tox tox-uv pre-commit

      - name: Install pre-commit hooks
        run: pre-commit install

References

  • AGENTS.md section "Development Commands" describes tox and tox-uv usage
  • AGENTS.md section "Code Quality" describes pre-commit usage

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Copilot setup workflow configuration Add GitHub Copilot setup workflow for dev environment configuration Jan 20, 2026
Copilot AI requested a review from chrisjsewell January 20, 2026 00:41
Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The start of the file should look like:

name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
  workflow_dispatch:
  push:
    paths:
      - .github/workflows/copilot-setup-steps.yml
  pull_request:
    paths:
      - .github/workflows/copilot-setup-steps.yml

jobs:
  # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
  copilot-setup-steps:
    runs-on: ubuntu-latest

    # Set the permissions to the lowest permissions possible needed for your steps.
    # Copilot will be given its own token for its operations.
    permissions:
      # We clone the repository as part of setup steps to install dependencies
      contents: read

    # You can define any steps you want, and they will run before the agent starts.
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 20, 2026

The start of the file should look like:

Updated in f8d0b35. The workflow now includes:

  • Push and pull_request triggers with path filters for automatic validation
  • Explanatory comments about triggers and job name requirement
  • Permissions section with minimal contents: read permission
  • Updated to actions/checkout@v6
  • Renamed step to "Checkout code"

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the pr description human readable

Copy link
Author

Copilot AI commented Jan 20, 2026

Make the pr description human readable

Updated the PR description to use a narrative format with clear sections explaining the purpose, features, and alignment with project standards.

@chrisjsewell chrisjsewell marked this pull request as ready for review January 20, 2026 01:08
@chrisjsewell chrisjsewell changed the title Add GitHub Copilot setup workflow for dev environment configuration 🔧 Add GitHub Copilot setup workflow for dev environment configuration Jan 20, 2026
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.37%. Comparing base (4e10030) to head (f8d0b35).
⚠️ Report is 228 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1628      +/-   ##
==========================================
+ Coverage   86.87%   88.37%   +1.49%     
==========================================
  Files          56       70      +14     
  Lines        6532     9937    +3405     
==========================================
+ Hits         5675     8782    +3107     
- Misses        857     1155     +298     
Flag Coverage Δ
pytests 88.37% <ø> (+1.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants