-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
118 additions
and
168 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
name: Code Stability | ||
name: Code stability | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- "*" | ||
|
||
concurrency: | ||
group: stability-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
stability: | ||
name: Code Stability | ||
name: Code stability | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build Python | ||
uses: ./.github/actions | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.13 | ||
|
||
- name: Install tools | ||
run: poetry install --only dev | ||
run: pip install black ruff | ||
|
||
- id: ruff | ||
if: always() | ||
run: poetry run ruff check surrealdb/ | ||
- name: Run ruff checks | ||
run: ruff check src/ | ||
|
||
- id: Black | ||
if: always() | ||
run: poetry run black surrealdb/ --check --verbose --diff --color | ||
- name: Run black checks | ||
run: black --check --verbose --diff --color src/ | ||
|
||
- id: mypy | ||
if: always() | ||
run: poetry run mypy surrealdb/ | ||
- name: Run mypy checks | ||
run: mypy src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
concurrency: | ||
group: tests-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run-unit-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
surrealdb-version: ["v2.1.0", "v2.1.1", "v2.1.2", "v2.1.3", "v2.1.4"] # v2.0.0 has different UPSERT behaviour | ||
name: Python ${{ matrix.python-version }} - SurrealDB ${{ matrix.surrealdb-version }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install surrealdb | ||
run: curl -sSf https://install.surrealdb.com | sh -s -- --version ${{ matrix.surrealdb-version }} | ||
|
||
- name: Start surrealdb | ||
run: surreal start --allow-all -u root -p root --log trace & | ||
|
||
- name: Wait for startup | ||
run: sleep 5 | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Run unit tests (HTTP) | ||
run: python -m unittest discover -s tests | ||
env: | ||
PYTHONPATH: ./src | ||
SURREALDB_URL: http://localhost:8000 | ||
|
||
- name: Run unit tests (WebSocket) | ||
run: python -m unittest discover -s tests | ||
env: | ||
PYTHONPATH: ./src | ||
SURREALDB_URL: ws://localhost:8000 | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters