Test against mysql
This commit is contained in:
parent
3479e5ba35
commit
f4b9e754d8
96
.github/workflows/build.yml
vendored
96
.github/workflows/build.yml
vendored
@ -14,58 +14,58 @@ jobs:
|
|||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_DB: dataset
|
POSTGRES_DB: dataset
|
||||||
ports:
|
ports:
|
||||||
- 5432/tcp
|
- 5432/tcp
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
mariadb:
|
mysql:
|
||||||
image: mariadb
|
image: mysql
|
||||||
env:
|
env:
|
||||||
MYSQL_USER: mariadb
|
MYSQL_USER: mysql
|
||||||
MYSQL_PASSWORD: mariadb
|
MYSQL_PASSWORD: mysql
|
||||||
MYSQL_DATABASE: dataset
|
MYSQL_DATABASE: dataset
|
||||||
MYSQL_ROOT_PASSWORD: mariadb
|
MYSQL_ROOT_PASSWORD: mysql
|
||||||
ports:
|
ports:
|
||||||
- 3306/tcp
|
- 3306/tcp
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Show ref
|
- name: Show ref
|
||||||
run: |
|
run: |
|
||||||
echo "$GITHUB_REF"
|
echo "$GITHUB_REF"
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: "3.x"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -qq update
|
sudo apt-get -qq update
|
||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
- name: Run SQLite tests
|
- name: Run SQLite tests
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: 'sqlite:///:memory:'
|
DATABASE_URL: "sqlite:///:memory:"
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
- name: Run PostgreSQL tests
|
- name: Run PostgreSQL tests
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: 'postgresql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/dataset'
|
DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/dataset"
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
- name: Run MariaDB tests
|
- name: Run mysql tests
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: 'mysql+pymysql://mariadb:mariadb@127.0.0.1:${{ job.services.mariadb.ports[3306] }}/dataset?charset=utf8'
|
DATABASE_URL: "mysql+pymysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/dataset?charset=utf8"
|
||||||
run: |
|
run: |
|
||||||
make test
|
make test
|
||||||
- name: Run flake8 to lint
|
- name: Run flake8 to lint
|
||||||
run: |
|
run: |
|
||||||
flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset
|
flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset
|
||||||
- name: Build a distribution
|
- name: Build a distribution
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
- name: Publish a Python distribution to PyPI
|
- name: Publish a Python distribution to PyPI
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.pypi_password }}
|
password: ${{ secrets.pypi_password }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user