Trying the pr to check if it works right away
### Description
<!-- Describe your changes in detail -->
### Checklist
<!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once)
-->
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which
must include a complete example of the issue. one line code fixes without an
issue and demonstration will not be accepted.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
- Please include: `Fixes: #<issue number>` in the commit message
- please include tests.
**Have a nice day!**
Closes: #5222
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5222
Pull-request-sha:
afbb8567525f3841554d3ba599ef4d713c78e647
Change-Id: I4981b02f900e76e446cf42e6cc6495ffc0883951
--- /dev/null
+name: Run tests on a pr
+
+on:
+ # run on pull request to master excluding changes that are only on doc or example folders
+ pull_request:
+ branches:
+ - master
+ paths-ignore:
+ - "doc/**"
+ - "examples/**"
+
+env:
+ # global env to all steps
+ TOX_WORKERS: -n2
+
+jobs:
+ run-test:
+ name: ${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.architecture }}-${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ # run this job using this matrix, excluding some combinations below.
+ matrix:
+ os:
+ - "ubuntu-latest"
+ python-version:
+ - "3.8"
+ build-type:
+ - "nocext"
+ architecture:
+ - x64
+ # abort all jobs as soon as one fails
+ fail-fast: true
+
+ # steps to run in each job. Some are github actions, others run shell commands
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Set up python
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: ${{ matrix.architecture }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install tox
+
+ - name: Run tests
+ run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }}
--- /dev/null
+name: Run tests
+
+on:
+ # run on push in master or rel_* branches excluding changes are only on doc or example folders
+ push:
+ branches:
+ - master
+ - "rel_*"
+ # branches used to test the workflow
+ - "workflow_test_*"
+ paths-ignore:
+ - "doc/**"
+ - "examples/**"
+
+env:
+ # global env to all steps
+ TOX_WORKERS: -n2
+
+jobs:
+ run-test:
+ name: ${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.architecture }}-${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ # run this job using this matrix, excluding some combinations below.
+ matrix:
+ os:
+ - "ubuntu-latest"
+ - "windows-latest"
+ - "macos-latest"
+ python-version:
+ - "2.7"
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ build-type:
+ - "cext"
+ - "nocext"
+ architecture:
+ - x64
+ - x86
+
+ include:
+ # the mock reconnect test seems to fail on the ci in windows
+ - os: "windows-latest"
+ pytest-args: "-k 'not MockReconnectTest'"
+
+ exclude:
+ # c-extensions fail to build on windows for python 3.5 and 2.7
+ - os: "windows-latest"
+ python-version: "2.7"
+ build-type: "cext"
+ - os: "windows-latest"
+ python-version: "3.5"
+ build-type: "cext"
+ # linux and osx do not have x86 python
+ - os: "ubuntu-latest"
+ architecture: x86
+ - os: "macos-latest"
+ architecture: x86
+
+ # abort all jobs as soon as one fails
+ fail-fast: true
+
+ # steps to run in each job. Some are github actions, others run shell commands
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Set up python
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: ${{ matrix.architecture }}
+
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install tox
+
+ - name: Run tests
+ run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }}
commands =
flake8 ./lib/ ./test/ ./examples/ setup.py doc/build/conf.py
black --check .
+
+# command run in the github action when cext are active.
+[testenv:github-cext]
+commands=
+ python -m pytest {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:NOMEMORY:} {env:COVERAGE:} {posargs}
+ oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt
+
+# command run in the github action when cext are not active.
+[testenv:github-nocext]
+commands=
+ python -m pytest {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:NOMEMORY:} {env:COVERAGE:} {posargs}
+ oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt
\ No newline at end of file