Skip to content

Commit 5b09eee

Browse files
authored
Fix: CI (#190)
* creatign a new PR just to test actions * uses default github action from strawberry repo * making a test wrong to see if gets a error * make test correct again * take back poetry command * another test * test with coverage cml * add coverage package * change codecove version * change order * ops * trying wiht no async to see whats wrong with xdist * bring back async * fix: BigInt raising errors * add release md
1 parent f9c09a1 commit 5b09eee

File tree

3 files changed

+41
-48
lines changed

3 files changed

+41
-48
lines changed

.github/workflows/test.yml

+36-48
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ jobs:
2424
outputs:
2525
sessions: ${{ steps.set-matrix.outputs.sessions }}
2626
steps:
27-
- uses: actions/checkout@v3
28-
- uses: wntrblm/nox@main
29-
- run: pipx install poetry
30-
- run: pipx inject nox nox-poetry
27+
- uses: actions/checkout@v4
28+
- run: pip install poetry nox nox-poetry
3129
- id: set-matrix
3230
shell: bash
3331
run: |
@@ -51,36 +49,25 @@ jobs:
5149
session: ${{ fromJson(needs.generate-jobs-tests.outputs.sessions) }}
5250

5351
steps:
54-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v4
5553
- uses: ikalnytskyi/action-setup-postgres@v4
56-
- uses: wntrblm/nox@main
57-
with:
58-
python-versions: "3.8, 3.9, 3.10, 3.11, 3.12"
59-
60-
- name: Pip and nox cache
61-
id: cache
62-
uses: actions/cache@v3
54+
- uses: actions/setup-python@v5
6355
with:
64-
path: |
65-
~/.cache
66-
~/.nox
67-
.nox
68-
key: ${{ runner.os }}-nox-${{ matrix.session.session }}-${{
69-
hashFiles('**/poetry.lock') }}-${{ hashFiles('**/noxfile.py') }}
70-
restore-keys: |
71-
${{ runner.os }}-nox-${{ matrix.session.session }}-
72-
${{ runner.os }}-nox-
73-
74-
- run: pipx install coverage
75-
- run: pipx install poetry
76-
- run: pipx inject nox nox-poetry
56+
python-version: |
57+
3.8
58+
3.9
59+
3.10
60+
3.11
61+
3.12
62+
3.13-dev
63+
64+
- run: pip install poetry nox nox-poetry coverage
7765
- run: nox -r -t tests -s "${{ matrix.session.session }}"
78-
7966
- name: coverage xml
8067
run: coverage xml -i
8168
if: ${{ always() }}
8269

83-
- uses: codecov/codecov-action@v3
70+
- uses: codecov/codecov-action@v4
8471
if: ${{ always() }}
8572
with:
8673
token: ${{ secrets.CODECOV_TOKEN }}
@@ -94,65 +81,66 @@ jobs:
9481
fail-fast: false
9582

9683
steps:
97-
- uses: actions/checkout@v3
84+
- uses: actions/checkout@v4
9885
- run: pipx install poetry
99-
- uses: actions/setup-python@v4
86+
- uses: actions/setup-python@v5
10087
id: setup-python
10188
with:
102-
python-version: "3.12.0-rc.2"
89+
python-version: "3.12"
10390
architecture: x64
10491
cache: "poetry"
10592

106-
- run: poetry env use 3.12.0-rc.2
107-
- run: poetry run pip install --upgrade pip setuptools wheel
93+
- run: poetry env use 3.12
10894
- run: poetry install
10995
if: steps.setup-python.outputs.cache-hit != 'true'
11096

11197
- name: Run benchmarks
112-
uses: CodSpeedHQ/action@v1
98+
uses: CodSpeedHQ/action@v2
11399
with:
114100
token: ${{ secrets.CODSPEED_TOKEN }}
115101
run: poetry run pytest tests/benchmarks --codspeed
116102

117103
lint:
118104
name: ✨ Lint
119105
runs-on: ubuntu-latest
120-
strategy:
121-
fail-fast: false
122106

123107
steps:
124-
- uses: actions/checkout@v3
125-
- uses: wntrblm/nox@main
108+
- uses: actions/checkout@v4
109+
- uses: actions/setup-python@v5
126110
with:
127-
python-versions: "3.8, 3.9, 3.10, 3.11, 3.12"
111+
python-version: |
112+
3.8
113+
3.9
114+
3.10
115+
3.11
116+
3.12
128117
129118
- name: Pip and nox cache
130119
id: cache
131-
uses: actions/cache@v3
120+
uses: actions/cache@v4
132121
with:
133122
path: |
134123
~/.cache
135124
~/.nox
136125
.nox
137-
key: ${{ runner.os }}-nox-lint-${{ matrix.session.session }}-${{
126+
key:
127+
${{ runner.os }}-nox-lint-${{ env.pythonLocation }}-${{
138128
hashFiles('**/poetry.lock') }}-${{ hashFiles('**/noxfile.py') }}
139129
restore-keys: |
140-
${{ runner.os }}-lint-nox-${{ matrix.session.session }}-
141-
${{ runner.os }}-lint-nox-
130+
${{ runner.os }}-nox-lint-${{ env.pythonLocation }}
142131
143-
- run: pipx install poetry
144-
- run: pipx inject nox nox-poetry
132+
- run: pip install poetry nox nox-poetry uv
145133
- run: nox -r -t lint
146134

147135
unit-tests-on-windows:
148136
name: 🪟 Tests on Windows
149137
runs-on: windows-latest
150138

151139
steps:
152-
- uses: actions/checkout@v3
140+
- uses: actions/checkout@v4
153141
- run: pipx install poetry
154142
- run: pipx install coverage
155-
- uses: actions/setup-python@v4
143+
- uses: actions/setup-python@v5
156144
id: setup-python
157145
with:
158146
python-version: "3.11"
@@ -164,14 +152,14 @@ jobs:
164152

165153
# we use poetry directly instead of nox since we want to
166154
# test all integrations at once on windows
155+
# but we want to exclude tests/mypy since we are using an old version of pydantic
167156
- run: |
168157
poetry run pytest --cov=. --cov-append --cov-report=xml -n auto --showlocals -vv
169-
170158
- name: coverage xml
171159
run: coverage xml -i
172160
if: ${{ always() }}
173161

174-
- uses: codecov/codecov-action@v3
162+
- uses: codecov/codecov-action@v4
175163
if: ${{ always() }}
176164
with:
177165
token: ${{ secrets.CODECOV_TOKEN }}

RELEASE.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Release type: patch
2+
3+
Resolved an issue with the BigInt scalar definition, ensuring compatibility with Python 3.8 and 3.9. The missing name parameter was added to prevent runtime errors.
4+
Fixed failing CI tests by updating the GitHub Actions workflow to improve test stability.

src/strawberry_sqlalchemy_mapper/scalars.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
serialize=lambda v: int(v),
88
parse_value=lambda v: str(v),
99
description="BigInt field",
10+
name="BigInt",
1011
)

0 commit comments

Comments
 (0)