Skip to content

Commit

Permalink
Merge branch 'main' into lsp_assets
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Dec 24, 2024
2 parents 80a4f89 + 3260974 commit 4df70c3
Show file tree
Hide file tree
Showing 218 changed files with 7,713 additions and 6,479 deletions.
33 changes: 33 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -- repository yaml --

# Explicitly wait for all jobs to finish, as wait_for_ci prematurely triggers.
# See https://github.com/python-trio/trio/issues/2689
codecov:
notify:
# This number needs to be changed whenever the number of runs in CI is changed.
# Another option is codecov-cli: https://github.com/codecov/codecov-cli#send-notifications
after_n_builds: 31
wait_for_ci: false
notify_error: true # if uploads fail, replace cov comment with a comment with errors.
require_ci_to_pass: false

# Publicly exposing the token has some small risks from mistakes or malicious actors.
# See https://docs.codecov.com/docs/codecov-tokens for correctly configuring it.
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46

# only post PR comment if coverage changes
comment:
require_changes: true

coverage:
# required range
precision: 5
round: down
range: 100..100
status:
project:
default:
target: 100%
patch:
default:
target: 100% # require patches to be 100%
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# sorting all imports with isort
933f77b96f0092e1baab4474a9208fc2e379aa32
# enabling ruff's flake8-commas rule
b25c02a94e2defcb0fad32976b02218be1133bdf
32 changes: 22 additions & 10 deletions .github/workflows/autodeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,37 @@ jobs:
issues: write
repository-projects: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: true # credentials are needed to push commits
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"

- name: Bump dependencies
run: |
python -m pip install -U pip
python -m pip install -U pip pre-commit
python -m pip install -r test-requirements.txt
pip-compile -U test-requirements.in
pip-compile -U docs-requirements.in
uv pip compile --universal --python-version=3.9 --upgrade test-requirements.in -o test-requirements.txt
uv pip compile --universal --python-version=3.11 --upgrade docs-requirements.in -o docs-requirements.txt
pre-commit autoupdate --jobs 0
- name: Install new requirements
run: python -m pip install -r test-requirements.txt

# apply newer versions' formatting
- name: Black
run: black src/trio

- name: uv
run: |
# The new dependencies may contain a new black version.
# Commit any changes immediately.
python -m pip install -r test-requirements.txt
black src/trio
uv pip compile --universal --python-version=3.9 test-requirements.in -o test-requirements.txt
uv pip compile --universal --python-version=3.11 docs-requirements.in -o docs-requirements.txt
- name: Commit changes and create automerge PR
env:
GH_TOKEN: ${{ github.token }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/check-newsfragment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check newsfragment

on:
pull_request:
types: [labeled, unlabeled, opened, synchronize]
branches:
- main

jobs:
check-newsfragment:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip newsfragment') }}
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Check newsfragments
run: |
if git diff --name-only origin/main | grep -v '/_tests/' | grep 'src/trio/'; then
git diff --name-only origin/main | grep 'newsfragments/' || exit 1
fi
Loading

0 comments on commit 4df70c3

Please sign in to comment.