forked from sqlalchemy/sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
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,56 @@ | ||
name: Run tests | ||
|
||
on: | ||
# run on push in main or rel_* branches excluding changes are only on doc or example folders | ||
push: | ||
branches: | ||
- main | ||
- "rel_*" | ||
# branches used to test the workflow | ||
- "workflow_test_*" | ||
paths-ignore: | ||
- "examples/**" | ||
|
||
env: | ||
# global env to all steps | ||
TOX_WORKERS: -n2 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run-test: | ||
name: test-${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.architecture }}-${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
|
||
# steps to run in each job. Some are github actions, others run shell commands | ||
steps: | ||
- name: start ob docker | ||
run: | | ||
docker run -p 2881:2881 -e MODE=slim -e OB_SYS_PASSWORD=123456 -e OB_TENANT_PASSWORD=123456 -d oceanbase/oceanbase-ce | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
architecture: x64 | ||
|
||
- name: Remove greenlet | ||
if: ${{ matrix.no-greenlet == 'true' }} | ||
shell: pwsh | ||
run: | | ||
(cat setup.cfg) | %{$_ -replace "^\s*greenlet.+",""} | set-content setup.cfg | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade tox setuptools | ||
pip list | ||
pip install pymysql | ||
- name: Run tests | ||
run: pytest | ||
|
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