summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yaml
blob: 7df26a6a41921d2563becc3cd5ec7ad57a743c27 (plain)
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
name: Test

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        image:
          - fedora:latest

    runs-on: ubuntu-latest
    container: ${{ matrix.image }}

    steps:
      - uses: actions/checkout@v2

      - name: Install dependencies (Ubuntu)
        if: startsWith(matrix.image, 'ubuntu:')
        run: |
          apt-get update
          DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends dbus gtk-doc-tools intltool libaudit-dev libgcrypt20-dev libgirepository1.0-dev libglib2.0-dev libpam0g-dev libtool libxcb1-dev libxdmcp-dev libxklavier-dev python3 python3-gi python-is-python3 qtbase5-dev valac yelp-tools

      - name: Install dependencies (Fedora)
        if: startsWith(matrix.image, 'fedora:')
        run: |
          dnf install -y audit-libs-devel dbus-daemon gcc gcc-c++ gobject-introspection-devel glib2-devel gtk-doc intltool libgcrypt-devel libtool libxcb-devel libxklavier-devel libXdmcp-devel make pam-devel python3-gobject qt5-qtbase-devel redhat-rpm-config vala yelp-tools

      - name: Build and test
        run: |
          ./autogen.sh --disable-silent-rules --enable-gtk-doc
          make
          make check

      - name: Upload Test Log
        if: failure()
        uses: actions/upload-artifact@v2
        with:
          name: Test Log
          path: tests/test-suite.log