Skip to content

Commit 68b1e2e

Browse files
committed
Add linux packaging testing CI
Signed-off-by: Vitalii Koshura <[email protected]>
1 parent 3833dc2 commit 68b1e2e

File tree

5 files changed

+199
-169
lines changed

5 files changed

+199
-169
lines changed

Diff for: .github/workflows/debrepo/Dockerfile

-55
This file was deleted.

Diff for: .github/workflows/linux-package.yml

+198-2
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,207 @@ jobs:
409409
name: linux-package_${{ matrix.type }}_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
410410
path: rpmbuild/RPMS/${{ env.ARCH }}/${{ env.PKG_FULL }}.rpm
411411

412+
test-debian-deb-package:
413+
name: Test Debian DEB Package
414+
runs-on: ubuntu-latest
415+
container:
416+
image: debian:${{ matrix.os }}
417+
needs: build-deb-package
418+
strategy:
419+
matrix:
420+
os: [bullseye, buster]
421+
fail-fast: false
422+
steps:
423+
- uses: actions/checkout@v3
424+
with:
425+
fetch-depth: 2
426+
427+
- name: Install dependencies
428+
if: success()
429+
run: |
430+
apt update -qq
431+
apt install -y python3
432+
433+
- name: Download client
434+
if: success()
435+
uses: actions/download-artifact@v3
436+
with:
437+
name: linux-package_client_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
438+
439+
- name: Download manager
440+
if: success()
441+
uses: actions/download-artifact@v3
442+
with:
443+
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
444+
445+
- name: Install client and manager
446+
if: success()
447+
run: |
448+
apt update -qq
449+
apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
450+
apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
451+
452+
- name: Run integration tests
453+
if: success()
454+
run: |
455+
python3 ./tests/linux_package_tests/integration_tests.py
456+
457+
test-ubuntu-deb-package:
458+
name: Test Ubuntu DEB Package
459+
runs-on: ubuntu-latest
460+
container:
461+
image: ubuntu:${{ matrix.os }}
462+
needs: build-deb-package
463+
strategy:
464+
matrix:
465+
os: [jammy, focal]
466+
fail-fast: false
467+
steps:
468+
- uses: actions/checkout@v3
469+
with:
470+
fetch-depth: 2
471+
472+
- name: Install dependencies
473+
if: success()
474+
run: |
475+
apt update -qq
476+
apt install -y python3
477+
478+
- name: Download client
479+
if: success()
480+
uses: actions/download-artifact@v3
481+
with:
482+
name: linux-package_client_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
483+
484+
- name: Download manager
485+
if: success()
486+
uses: actions/download-artifact@v3
487+
with:
488+
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}
489+
490+
- name: Install client and manager
491+
if: success()
492+
run: |
493+
apt update -qq
494+
apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
495+
apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
496+
497+
- name: Run integration tests
498+
if: success()
499+
run: |
500+
python3 ./tests/linux_package_tests/integration_tests.py
501+
502+
test-fedora-rpm-package:
503+
name: Test Fedora RPM Package
504+
runs-on: ubuntu-latest
505+
container:
506+
image: fedora:${{ matrix.os }}
507+
needs: build-rpm-package
508+
strategy:
509+
matrix:
510+
os: [37, 38]
511+
fail-fast: false
512+
steps:
513+
- uses: actions/checkout@v3
514+
with:
515+
fetch-depth: 2
516+
517+
- name: Install dependencies
518+
if: success()
519+
run: |
520+
dnf install -y python3
521+
522+
- name: Get OS name
523+
if: success()
524+
run: |
525+
if [[ "${{ matrix.os }}" == "37" ]]; then
526+
OS="fc37"
527+
elif [[ "${{ matrix.os }}" == "38" ]]; then
528+
OS="fc38"
529+
fi
530+
echo "OS=${OS}" >> $GITHUB_ENV
531+
532+
- name: Download client
533+
if: success()
534+
uses: actions/download-artifact@v3
535+
with:
536+
name: linux-package_client_${{ env.OS }}_${{ github.event.pull_request.head.sha }}
537+
538+
- name: Download manager
539+
if: success()
540+
uses: actions/download-artifact@v3
541+
with:
542+
name: linux-package_manager_${{ env.OS }}_${{ github.event.pull_request.head.sha }}
543+
544+
- name: Install client and manager
545+
if: success()
546+
run: |
547+
yum localinstall -y $(find ./ -type f -name "boinc-client*.rpm" -printf "%p\n")
548+
yum localinstall -y $(find ./ -type f -name "boinc-manager*.rpm" -printf "%p\n")
549+
550+
- name: Run integration tests
551+
if: success()
552+
run: |
553+
python3 ./tests/linux_package_tests/integration_tests.py
554+
555+
test-opensuse-rpm-package:
556+
name: Test openSUSE RPM Package
557+
runs-on: ubuntu-latest
558+
container:
559+
image: opensuse/leap:${{ matrix.os }}
560+
needs: build-rpm-package
561+
strategy:
562+
matrix:
563+
os: [15.4, 15.5]
564+
fail-fast: false
565+
steps:
566+
- name: Install dependencies
567+
if: success()
568+
run: |
569+
zypper install -y python3 tar
570+
571+
- uses: actions/checkout@v3
572+
with:
573+
fetch-depth: 2
574+
575+
- name: Get OS name
576+
if: success()
577+
run: |
578+
if [[ "${{ matrix.os }}" == "15.4" ]]; then
579+
OS="suse15_4"
580+
elif [[ "${{ matrix.os }}" == "15.5" ]]; then
581+
OS="suse15_5"
582+
fi
583+
echo "OS=${OS}" >> $GITHUB_ENV
584+
585+
- name: Download client
586+
if: success()
587+
uses: actions/download-artifact@v3
588+
with:
589+
name: linux-package_client_${{ env.OS }}_${{ github.event.pull_request.head.sha }}
590+
591+
- name: Download manager
592+
if: success()
593+
uses: actions/download-artifact@v3
594+
with:
595+
name: linux-package_manager_${{ env.OS }}_${{ github.event.pull_request.head.sha }}
596+
597+
- name: Install client and manager
598+
if: success()
599+
run: |
600+
zypper --no-gpg-checks install -y $(find ./ -type f -name "boinc-client*.rpm" -printf "%p\n")
601+
zypper --no-gpg-checks install -y $(find ./ -type f -name "boinc-manager*.rpm" -printf "%p\n")
602+
603+
- name: Run integration tests
604+
if: success()
605+
run: |
606+
python3 ./tests/linux_package_tests/integration_tests.py
607+
412608
publish-deb-package:
413609
name: Publish DEB Package
414610
if: github.repository == 'BOINC/boinc'
415611
runs-on: ubuntu-latest
416-
needs: build-deb-package
612+
needs: [test-debian-deb-package, test-ubuntu-deb-package]
417613
strategy:
418614
matrix:
419615
os: [jammy, focal, bullseye, buster]
@@ -506,7 +702,7 @@ jobs:
506702
runs-on: ubuntu-latest
507703
container:
508704
image: fedora:38
509-
needs: build-rpm-package
705+
needs: [test-fedora-rpm-package, test-opensuse-rpm-package]
510706
strategy:
511707
matrix:
512708
os: [fc38, fc37, suse15_5, suse15_4]

Diff for: .github/workflows/rpmrepo/Dockerfile.fedora

-55
This file was deleted.

Diff for: .github/workflows/rpmrepo/Dockerfile.suse

-57
This file was deleted.

Diff for: tests/linux_package_tests/integration_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Here will be integration tests")

0 commit comments

Comments
 (0)