OpenSSL ocsp and tinyproxy do not work on all the systems #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit tests with proxy | |
on: | |
push: | |
branches: | |
- $default-branch | |
- development | |
- master | |
paths-ignore: | |
- varia/** | |
- '**.md' | |
- utils/prepare_rpm.sh | |
- .github/workflows/publish.yml | |
# Run tests for any PRs | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
############################################################################## | |
# macOS | |
macos: | |
name: Running unit tests on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-11 | |
- macos-12 | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v3 | |
- name: Install shellcheck | |
run: brew install shellcheck shunit2 bash-completion nmap tinyproxy | |
- name: install cpanm and Date::Parse | |
uses: perl-actions/install-with-cpanm@v1 | |
with: | |
install: Date::Parse | |
- name: Run the unit tests | |
run: | | |
uname -a \ | |
&& make unit_tests_with_proxy \ | |
&& bash -c "source ./check_ssl_cert.completion && complete -p check_ssl_cert" \ | |
&& make dist \ | |
&& sudo make install_bash_completion && bash -c "source ./check_ssl_cert.completion && complete -p check_ssl_cert" \ | |
&& if command -v shellcheck > /dev/null 2>&1 ; then shellcheck ./check_ssl_cert test/*.sh ; fi | |
############################################################################## | |
# Linuxes | |
linux: | |
# The host should always be linux | |
runs-on: ubuntu-latest | |
name: Running unit tests on ${{ matrix.distro }} | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- 'debian:10' | |
- 'debian:11' | |
include: | |
- distro: 'debian:10' | |
pre: >- | |
apt-get update && | |
DEBIAN_FRONTEND=noninteractive apt-get -y install nmap shellcheck curl sudo perl make bzip2 file openssl dnsutils shunit2 man bc bash-completion default-jre tinyproxy | |
- distro: 'debian:11' | |
pre: >- | |
apt-get update && | |
DEBIAN_FRONTEND=noninteractive apt-get -y install nmap shellcheck curl sudo perl make bzip2 file openssl dnsutils shunit2 man bc bash-completion iproute2 default-jre tinyproxy | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v3 | |
- name: Run the unit tests on ${{ matrix.distro }} | |
env: | |
PRE: ${{ matrix.pre }} | |
run: | | |
echo $PRE > ./prep-cmd.sh | |
docker run --network host -w /check_ssl_cert -v ${PWD}:/check_ssl_cert ${{ matrix.distro }} \ | |
/bin/sh -c 'sh ./prep-cmd.sh \ | |
&& curl -L https://cpanmin.us | sudo perl - --sudo App::cpanminus \ | |
&& cpanm --sudo install Date::Parse \ | |
&& uname -a \ | |
&& make unit_tests_with_proxy \ | |
&& bash -c "source ./check_ssl_cert.completion && complete -p check_ssl_cert" \ | |
&& make dist \ | |
&& sudo make install_bash_completion && bash -c "source ./check_ssl_cert.completion && complete -p check_ssl_cert" \ | |
&& if command -v shellcheck > /dev/null 2>&1 ; then shellcheck ./check_ssl_cert test/*.sh ; fi' | |
rpm: | |
# The host should always be linux | |
runs-on: ubuntu-latest | |
name: Running RPM tests on ${{ matrix.distro }} | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- 'centos:7' | |
- 'fedora:37' | |
- 'fedora:38' | |
include: | |
- distro: 'fedora:37' | |
pre: >- | |
dnf install -y hostname && | |
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl bind-utils rpm-build git bash-completion | |
- distro: 'fedora:38' | |
pre: >- | |
dnf install -y hostname && | |
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl bind-utils rpm-build git bash-completion | |
- distro: 'centos:7' | |
pre: >- | |
yum install -y nmap curl sudo perl make bzip2 file openssl dig perl-ExtUtils-MakeMaker perl-Test-Simple rpm-build bash-completion | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v3 | |
- name: Build the RPM on ${{ matrix.distro }} | |
env: | |
PRE: ${{ matrix.pre }} | |
run: | | |
echo $PRE > ./prep-cmd.sh | |
docker run --network host -w /check_ssl_cert -v ${PWD}:/check_ssl_cert ${{ matrix.distro }} \ | |
/bin/sh -c 'sh ./prep-cmd.sh \ | |
&& uname -a \ | |
&& make rpm' | |
rpm-nocompletion: | |
# The host should always be linux | |
runs-on: ubuntu-latest | |
name: Running RPM tests without bash completion on ${{ matrix.distro }} | |
strategy: | |
fail-fast: false | |
matrix: | |
distro: | |
- 'centos:7' | |
- 'fedora:37' | |
- 'fedora:38' | |
include: | |
- distro: 'fedora:37' | |
pre: >- | |
dnf install -y hostname && | |
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl bind-utils rpm-build git | |
- distro: 'fedora:38' | |
pre: >- | |
dnf install -y hostname && | |
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl bind-utils rpm-build git | |
- distro: 'centos:7' | |
pre: >- | |
yum install -y nmap curl sudo perl make bzip2 file openssl dig perl-ExtUtils-MakeMaker perl-Test-Simple rpm-build | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v3 | |
- name: Build the RPM on ${{ matrix.distro }} | |
env: | |
PRE: ${{ matrix.pre }} | |
run: | | |
echo $PRE > ./prep-cmd.sh | |
docker run --network host -w /check_ssl_cert -v ${PWD}:/check_ssl_cert ${{ matrix.distro }} \ | |
/bin/sh -c 'sh ./prep-cmd.sh \ | |
&& uname -a \ | |
&& make rpm' |