-
Notifications
You must be signed in to change notification settings - Fork 1.1k
38 lines (35 loc) · 1.14 KB
/
unit-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
name: unit-tests
on: [pull_request, workflow_dispatch]
jobs:
unit-tests:
runs-on: ubuntu-22.04
permissions: {}
strategy:
matrix:
target:
- check-memory
- distcheck
# this runs static code checks, unlike distcheck
- check
- pytest-cov
fail-fast: false
timeout-minutes: 60
steps:
- name: Run unit test
timeout-minutes: 30
run: |
set -eux
IMAGE="$(curl --fail https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_SHA}/.cockpit-ci/container)"
podman run --security-opt=seccomp=unconfined --network=host --rm --interactive "${IMAGE}" sh -eux <<EOF
export FORCE_COLOR=1
export TEST_BROWSER=firefox
export CFLAGS=-O2
git clone https://github.com/${GITHUB_REPOSITORY} make-checkout-workdir
cd make-checkout-workdir
git fetch origin ${GITHUB_SHA}
git reset --hard ${GITHUB_SHA}
vendor/checkout
test/common/make-bots
./autogen.sh
make -j$(nproc) '${{ matrix.target }}'
EOF