refactor(lists): extract allow-block administration #9
This file contains hidden or 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: Perl tests | |
| on: | |
| push: | |
| branches: [ "1.3" ] | |
| paths: | |
| - 'MailScanner_perl_scripts/**' | |
| - 'public_html/**' | |
| - 'src/MailWatch/**' | |
| - 'tests/perl/**' | |
| - 'tests/fixtures/api/**' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - '.github/workflows/perl-tests.yaml' | |
| pull_request: | |
| branches: [ "1.3" ] | |
| paths: | |
| - 'MailScanner_perl_scripts/**' | |
| - 'public_html/**' | |
| - 'src/MailWatch/**' | |
| - 'tests/perl/**' | |
| - 'tests/fixtures/api/**' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - '.github/workflows/perl-tests.yaml' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Perl contract tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: mysqli | |
| coverage: none | |
| # The integration test drives public_html/index.php, which loads the | |
| # Composer autoloader. Without this step the front controller dies before | |
| # it routes, and every assertion about the PHP side fails for one reason. | |
| - name: Install Composer dependencies | |
| uses: "ramsey/composer-install@v4" | |
| - name: Install cpanminus | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes --no-install-recommends cpanminus | |
| - name: Install Perl dependencies | |
| working-directory: MailScanner_perl_scripts | |
| run: sudo cpanm --notest --installdeps . | |
| - name: Compile MailWatch modules | |
| run: | | |
| perl -I MailScanner_perl_scripts -c MailScanner_perl_scripts/MailWatchClient.pm | |
| perl -I MailScanner_perl_scripts -c MailScanner_perl_scripts/MailWatch.pm | |
| perl -I MailScanner_perl_scripts -c MailScanner_perl_scripts/SQLAllowBlockList.pm | |
| perl -I MailScanner_perl_scripts -c MailScanner_perl_scripts/SQLSpamSettings.pm | |
| - name: Run Perl contract tests | |
| run: prove -I MailScanner_perl_scripts tests/perl |