New rpc-methods #98
Workflow file for this run
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
tests_python_38: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Start SurrealDB | |
uses: surrealdb/setup-surreal@v1 | |
with: | |
surrealdb_version: latest | |
surrealdb_port: 8000 | |
surrealdb_username: root | |
surrealdb_password: root | |
surrealdb_auth: true | |
surrealdb_additional_args: --allow-net | |
- name: Wait for SurrealDB to be ready | |
run: while ! curl --output /dev/null --silent --head --fail http://localhost:8000; do sleep 1 && echo -n .; done; | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install websocket-client pylint | |
- name: Lint | |
run: | | |
python -m pylint --rcfile pylint.toml src/surrealist | |
- name: Unit-tests | |
run: | | |
python -m unittest discover -s tests/unit_tests | |
- name: Integration tests with real DB | |
run: | | |
python -m unittest discover -s tests/integration_tests | |
check_versions: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11", "3.12" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Start SurrealDB | |
uses: surrealdb/setup-surreal@v1 | |
with: | |
surrealdb_version: latest | |
surrealdb_port: 8000 | |
surrealdb_username: root | |
surrealdb_password: root | |
surrealdb_auth: true | |
surrealdb_additional_args: --allow-net | |
- name: Wait for SurrealDB to be ready | |
run: while ! curl --output /dev/null --silent --head --fail http://localhost:8000; do sleep 1 && echo -n .; done; | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install websocket-client | |
- name: All tests | |
run: | | |
python -m unittest discover -s tests |