-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1010 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: onisep_testing
MYSQL_USER: onisep
MYSQL_PASSWORD: password
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- 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