File: test.yaml

package info (click to toggle)
pytrainer 2.2.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: python: 15,677; perl: 8,361; xml: 195; makefile: 87; sh: 54
file content (80 lines) | stat: -rw-r--r-- 2,310 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Test

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    container: ubuntu:20.04
    strategy:
      matrix:
        include:
          - database: sqlite
            database_url: "sqlite://"
          - database: mysql
            database_url: "mysql://pytrainer:pytrainer@mysql/pytrainer"
          - database: postgresql
            database_url: "postgresql://pytrainer:pytrainer@postgres/pytrainer"
    services:
      mysql:
        image: mysql:5.7
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
          MYSQL_DATABASE: pytrainer
          MYSQL_USER: pytrainer
          MYSQL_PASSWORD: pytrainer
        ports:
          - 3306:3306
        options: >-
          --health-cmd "mysqladmin ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
      postgres:
        image: postgres
        env:
          POSTGRES_USER: pytrainer
          POSTGRES_PASSWORD: pytrainer
        ports:
          - 5432:5432
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 1
      - name: install deps
        timeout-minutes: 5
        run: |
          apt-get update
          DEBIAN_FRONTEND=noninteractive apt-get install -y xvfb python3-pip python3-setuptools python3-gi gir1.2-gtk-3.0 python3-lxml python3-cairo python3-gi-cairo python3-matplotlib python3-psycopg2 python3-mysqldb locales-all
      - name: run tests
        timeout-minutes: 5
        env:
          PYTRAINER_ALCHEMYURL: ${{ matrix.database_url }}
          TZ: Europe/Kaliningrad
          LC_TIME: C
        run: xvfb-run python3 -Wall setup.py test

  test_tox:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v3
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install tox tox-gh-actions
    - name: Test with tox
      run: tox