File tree Expand file tree Collapse file tree 4 files changed +79
-0
lines changed
Expand file tree Collapse file tree 4 files changed +79
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,58 @@ jobs:
368368 ./*.rpm
369369 !./*-debuginfo-*.rpm
370370
371+ test-linux-packages :
372+ needs : build-linux-packages
373+ runs-on : ubuntu-22.04
374+ strategy :
375+ matrix :
376+ include :
377+ - os : ubuntu-22.04
378+ image : debian:stretch
379+ pkg : deb
380+ - os : ubuntu-22.04
381+ image : debian:buster
382+ pkg : deb
383+ - os : ubuntu-22.04
384+ image : debian:bullseye
385+ pkg : deb
386+ - os : ubuntu-22.04
387+ image : debiaa:bookworm
388+ pkg : deb
389+ - os : ubuntu-22.04
390+ image : ubuntu:xenial
391+ pkg : deb
392+ - os : ubuntu-22.04
393+ image : ubuntu:bionic
394+ pkg : deb
395+ - os : ubuntu-22.04
396+ image : ubuntu:focal
397+ pkg : deb
398+ - os : ubuntu-22.04
399+ image : ubuntu:jammy
400+ pkg : deb
401+ - os : ubuntu-22.04
402+ image : centos:7
403+ pkg : rpm
404+ - os : ubuntu-22.04
405+ image : rockylinux:8
406+ pkg : rpm
407+ - os : ubuntu-22.04
408+ image : rockylinux:9
409+ pkg : rpm
410+ steps :
411+ - uses : actions/checkout@v3
412+ - uses : actions/download-artifact@v3
413+ with :
414+ name : artifact-${{ matrix.os }}-amd64
415+ - uses : actions/download-artifact@v3
416+ with :
417+ name : artifact-${{ matrix.os }}-arm64
418+ - name : Testing the package
419+ run : |
420+ file=$(ls *.${{ matrix.pkg }} | head -n 1)
421+ bin/test_package "${{ matrix.image }}" "$file"
422+
371423 create-release :
372424 runs-on : ubuntu-22.04
373425 needs :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ file=$1
3+ dpkg -i $file
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ image=$1
3+ file=$2
4+
5+ container=test-package
6+ docker create --name $container --entrypoint sh -it " $image "
7+ docker start $container
8+ docker cp " $file " $container :" /$file "
9+
10+ if [[ $file =~ deb$ ]]; then
11+ docker exec $container ' apt-get update && apt-get install -y bash'
12+ docker cp bin/test_deb $container :/
13+ docker exec $container " /test_deb /$file "
14+ else
15+ docker exec ' yum update && yum install -y bash'
16+ docker cp bin/test_rpm $container :/
17+ docker exec $container " /test_rpm /$file "
18+ fi
19+
20+ docker rm -f $container
21+
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ file=$1
3+ rpm -i $file
You can’t perform that action at this time.
0 commit comments