-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (47 loc) · 1.54 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# SPDX-FileCopyrightText: (C) 2017-2024 Red Hat, Inc.
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
name: Unit tests
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
CI_IMAGE: fedora:latest
CI_CONTAINER: sid-fedora-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install podman
run: |
sudo apt -qq update
sudo apt -y -qq install podman
- name: Start the container
run: |
podman run -d -t --name ${{ env.CI_CONTAINER }} --privileged --volume "$(pwd):/app" --workdir "/app" ${{ env.CI_IMAGE }}
- name: Install SID build dependencies in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y install dnf-plugins-core && dnf -y builddep rpm/sid.spec"
- name: Install SID test dependencies in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "dnf -y install libcmocka-devel libcmocka"
- name: Build SID in the container
run: |
podman exec -it ${{ env.CI_CONTAINER }} bash -c "./autogen.sh && ./configure && make -j"
- name: Run tests
run: podman exec -it ${{ env.CI_CONTAINER }} bash -c "./autogen.sh && ./configure && make check"
- name: Upload the test suite logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test_logs
path: tests/test-suite.log