Skip to content

Commit

Permalink
ss
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanoOo committed Aug 29, 2024
1 parent 365b4a4 commit 689301c
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/run-pytest.yaml
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

4 changes: 0 additions & 4 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- 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: Set up python
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 689301c

Please sign in to comment.