Skip to content

Commit 38a4068

Browse files
committed
ci skeleton added
1 parent a0a89a9 commit 38a4068

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed

.github/workflows/dataconnect.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
firebaseToolsVersion:
1010
gradleInfoLog:
1111
type: boolean
12+
pythonVersion:
1213
pull_request:
1314
paths:
1415
- .github/workflows/dataconnect.yml
@@ -27,6 +28,7 @@ env:
2728
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '13.29.1' }}
2829
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
2930
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
31+
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}
3032

3133
concurrency:
3234
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -254,12 +256,69 @@ jobs:
254256
runs-on: ubuntu-latest
255257
steps:
256258
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
259+
sparse-checkout: '.github/'
257260
with:
258261
show-progress: false
259262
- uses: docker://rhysd/actionlint:1.7.7
260263
with:
261264
args: -color /github/workspace/.github/workflows/dataconnect.yml
262265

266+
python-ci-unit-tests:
267+
continue-on-error: false
268+
runs-on: ubuntu-latest
269+
steps:
270+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
271+
sparse-checkout: 'firebase-dataconnect/ci/'
272+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
273+
with:
274+
python-version: ${{ env.FDC_PYTHON_VERSION }}
275+
- run: pip install -r firebase-dataconnect/ci/requirements.txt
276+
- name: pytest
277+
working-directory: firebase-dataconnect/ci
278+
run: pytest --verbose --full-trace --color=no --strict-config
279+
280+
pytnon-ci-lint:
281+
continue-on-error: false
282+
runs-on: ubuntu-latest
283+
steps:
284+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
285+
sparse-checkout: 'firebase-dataconnect/ci/'
286+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
287+
with:
288+
python-version: ${{ env.FDC_PYTHON_VERSION }}
289+
- run: pip install -r firebase-dataconnect/ci/requirements.txt
290+
- name: ruff check
291+
working-directory: firebase-dataconnect/ci
292+
run: ruff check --diff --verbose --no-cache --output-format=github --exit-non-zero-on-fix
293+
294+
pytnon-ci-format:
295+
continue-on-error: false
296+
runs-on: ubuntu-latest
297+
steps:
298+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
299+
sparse-checkout: 'firebase-dataconnect/ci/'
300+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
301+
with:
302+
python-version: ${{ env.FDC_PYTHON_VERSION }}
303+
- run: pip install -r firebase-dataconnect/ci/requirements.txt
304+
- name: ruff format
305+
working-directory: firebase-dataconnect/ci
306+
run: ruff format --diff --verbose --no-cache
307+
308+
python-ci-type-check:
309+
continue-on-error: false
310+
runs-on: ubuntu-latest
311+
steps:
312+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
313+
sparse-checkout: 'firebase-dataconnect/ci/'
314+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
315+
with:
316+
python-version: ${{ env.FDC_PYTHON_VERSION }}
317+
- run: pip install -r firebase-dataconnect/ci/requirements.txt
318+
- name: pyright
319+
working-directory: firebase-dataconnect/ci
320+
run: pyright --warnings --stats
321+
263322
send-notifications:
264323
needs: [integration-test, actionlint-dataconnect-yml]
265324
if: always()

firebase-dataconnect/ci/notify_issue.py

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[project]
2+
name = "Firebase Data Connect Android SDK Continuous Integration Tools"
3+
requires-python = ">= 3.13"
4+
5+
[tool.pyright]
6+
include = ["**/*.py"]
7+
typeCheckingMode = "strict"
8+
9+
[tool.ruff]
10+
line-length = 100
11+
indent-width = 2
12+
13+
[tool.ruff.lint]
14+
select = ["ALL"]
15+
ignore = [
16+
"D100", # Missing docstring in public module
17+
"D211", # no-blank-line-before-class
18+
"D212", # multi-line-summary-second-line
19+
]
20+
21+
[tool.ruff.format]
22+
quote-style = "double"
23+
indent-style = "space"
24+
skip-magic-trailing-comma = false
25+
docstring-code-format = true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
iniconfig==2.1.0
2+
nodeenv==1.9.1
3+
packaging==24.2
4+
pluggy==1.5.0
5+
pyright==1.1.399
6+
pytest==8.3.5
7+
ruff==0.11.5
8+
typing_extensions==4.13.2

0 commit comments

Comments
 (0)