[pre-commit.ci] pre-commit autoupdate #204
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
# Copyright 2022 Timo Röhling <timo@gaussglocke.de> | |
# SPDX-License-Identifier: FSFAP | |
# | |
# Copying and distribution of this file, with or without modification, are | |
# permitted in any medium without royalty provided the copyright notice and | |
# this notice are preserved. This file is offered as-is, without any warranty. | |
# | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
milter: [OFF, ON] | |
sqlite: [OFF, ON] | |
redis: [OFF, ON] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y cmake postfix redis | |
- name: Build PostSRSd | |
run: | | |
mkdir _build | |
cd _build | |
cmake .. -DDEVELOPER_BUILD=ON -DWITH_MILTER=${{ matrix.milter }} -DWITH_SQLITE=${{ matrix.sqlite }} -DWITH_REDIS=${{ matrix.redis }} | |
make VERBOSE=ON | |
- name: Run tests | |
run: | | |
cd _build | |
ctest --output-on-failure | |
- name: Install and start PostSRSd daemon | |
run: | | |
cd _build | |
sudo make install | |
sed -e 's/^#srs-domain.*/srs-domain = "example.com"/' /usr/local/share/doc/postsrsd/postsrsd.conf | sudo tee /usr/local/etc/postsrsd.conf | |
sudo systemctl enable postsrsd | |
sudo systemctl start postsrsd | |
sudo journalctl --no-pager -u postsrsd | |
sudo systemctl --no-pager status postsrsd | |
- name: Test Postfix integration | |
run: | | |
postmap -q test@otherdomain.com socketmap:unix:/var/spool/postfix/srs:forward | tee /tmp/srs-alias.txt | |
postmap -q "$(cat /tmp/srs-alias.txt)" socketmap:unix:/var/spool/postfix/srs:reverse |