mysql #1
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
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 -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d mysql | |
- name: Sleep for 120 seconds | |
run: sleep 120s | |
shell: bash | |
- 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 | |
pip install pytest | |
pip install typing_extensions | |
- name: Run tests | |
run: python -m pytest | |