Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Add Python 3.12 #92

Merged
merged 7 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11","3.8.13", "3.9.12", "3.10.5"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Cache Requirements
Expand All @@ -37,9 +38,9 @@ jobs:
with:
path: |
venv
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/tests/requirements.txt') }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}
${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -65,7 +66,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
python-version: ["3.12"]
if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
runs-on: ubuntu-latest
steps:
Expand All @@ -74,6 +75,7 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Cache Requirements
Expand All @@ -84,9 +86,9 @@ jobs:
with:
path: |
venv
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-
${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -170,13 +172,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.11","3.8.13", "3.9.12", "3.10.5" ]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Cache Requirements
Expand All @@ -187,9 +190,9 @@ jobs:
with:
path: |
venv
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-
${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -232,7 +235,7 @@ jobs:
run: |
. venv/bin/activate
codecovcli -u ${{ secrets.CODECOV_PUBLIC_QA_URL }} upload-process --flag python${{ matrix.python-version }} --token ${{ secrets.CODECOV_PUBLIC_QA_TOKEN }} --fail-on-error


mutation:
name: Run Mutations
Expand All @@ -248,6 +251,7 @@ jobs:
with:
fetch-depth: 2
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Cache Requirements
Expand All @@ -258,9 +262,9 @@ jobs:
with:
path: |
venv
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ matrix.python-version }}
${{ runner.os }}-${{ env.cache-name }}-${{ steps.setup-python.outputs.python-version }}
- name: Install Requirements
run: |
make requirements.install
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"minio~=7.0",
"oauth2",
"protobuf>=4.21.6",
"tlslite-ng",
"tlslite-ng>=0.8.0b1",
"statsd>=3.3.0",
"prometheus-client",
"analytics-python==1.3.0b1",
Expand Down
2 changes: 1 addition & 1 deletion shared/reports/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def does_diff_adjust_tracked_lines(self, diff, future_report, future_diff):
Returns <boolean> if the diff touches tracked lines

master . A . C
pull \ . . B
pull | . . B

:diff = <diff> A...C
:future_report = <report> B
Expand Down
2 changes: 1 addition & 1 deletion shared/torngit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def diff_to_json(self, diff):
# ------------------------------
# make file, this is ONE file not multiple
for source in _diff:
if source == "\ No newline at end of file":
if re.match(r"\\ No newline at end of file", source):
continue

sol4 = source[:4]
Expand Down