Skip to content

do not use services

do not use services #8

Workflow file for this run

name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: shogo82148/actions-setup-mysql@v1
with:
distribution: "mariadb"
mysql-version: "10.6"
- run: mysql -uroot -e 'SELECT version()'
- name: Create MySQL user
run: |
mysql -u root -ppassword -e "CREATE DATABASE onisep_testing; CREATE USER 'onisep'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'onisep'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES;"
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pipenv"
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Install dependencies
run: |
pipenv install --deploy --dev
- name: Run Pytest
run: |
DATABASE_URI_TESTING="mysql+mysqlconnector://onisep:password@localhost/onisep_testing?charset=utf8mb4" pipenv run pytest
https://github.com/shogo82148/actions-setup-mysql