File: test_docker.yml

package info (click to toggle)
dfdatetime 20210509-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 752 kB
  • sloc: python: 5,973; sh: 20; makefile: 18
file content (80 lines) | stat: -rw-r--r-- 2,499 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
# Run tests on Fedora and Ubuntu Docker images using GIFT CORP and GIFT PPA on commit
name: test_docker
on: [push]
jobs:
  test_fedora:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: ['32', '33', '34']
    container:
      image: registry.fedoraproject.org/fedora:${{ matrix.version }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up container
      run: |
        dnf install -y dnf-plugins-core langpacks-en
    - name: Install dependencies
      run: |
        dnf copr -y enable @gift/dev
        dnf install -y python3 python3-mock python3-pbr python3-setuptools python3-six
    - name: Run tests
      env:
        LANG: C.utf8
      run: |
        python3 ./run_tests.py
    - name: Run end-to-end tests
      run: |
        if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi
    - name: Build source distribution
      run: |
        python3 ./setup.py sdist
    - name: Build binary distribution
      run: |
        python3 ./setup.py bdist
    - name: Run build and install test
      run: |
        python3 ./setup.py build
        python3 ./setup.py install
  test_ubuntu:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: ['18.04', '20.04']
    container:
      image: ubuntu:${{ matrix.version }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up container
      env:
        DEBIAN_FRONTEND: noninteractive
      run: |
        apt-get update -q
        apt-get install -y libterm-readline-gnu-perl locales software-properties-common
        locale-gen en_US.UTF-8
        ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
    - name: Install dependencies
      run: |
        add-apt-repository -y ppa:gift/dev
        apt-get update -q
        apt-get install -y python3 python3-distutils python3-mock python3-pbr python3-setuptools python3-six
    - name: Run tests
      env:
        LANG: en_US.UTF-8
      run: |
        python3 ./run_tests.py
    - name: Run end-to-end tests
      env:
        LANG: en_US.UTF-8
      run: |
        if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi
    - name: Build source distribution
      run: |
        python3 ./setup.py sdist
    - name: Build binary distribution
      run: |
        python3 ./setup.py bdist
    - name: Run build and install test
      run: |
        python3 ./setup.py build
        python3 ./setup.py install