forked from nitmir/policyd-rate-limit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
463 additions
and
153 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: policyd-rate-limit | ||
run-name: ${{ github.actor }} is running policyd-rate-limit CI tests | ||
on: [push] | ||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:bookworm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pip install tox | ||
- run: apt-get update && apt-get install -y --no-install-recommends sudo | ||
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser | ||
- run: sudo -u testuser tox -e flake8 | ||
check_rst: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:bookworm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pip install tox | ||
- run: apt-get update && apt-get install -y --no-install-recommends sudo | ||
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser | ||
- run: sudo -u testuser tox -e check_rst | ||
tests: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:bookworm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pip install tox | ||
- run: apt-get update && apt-get install -y --no-install-recommends sudo | ||
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser | ||
- run: sudo -u testuser tox -e py3 | ||
coverage: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: python:bookworm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pip install tox | ||
- run: apt-get update && apt-get install -y --no-install-recommends sudo | ||
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser | ||
- run: sudo --preserve-env=COVERAGE_TOKEN -u testuser tox -e coverage | ||
env: | ||
COVERAGE_TOKEN: ${{ secrets.COVERAGE_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Postfix policyd rate limiter - clean database | ||
After=syslog.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/local/bin/policyd-rate-limit --clean | ||
KillSignal=SIGINT | ||
StandardOutput=syslog | ||
StandardError=syslog | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Clean policyd rate limit database daily | ||
|
||
[Timer] | ||
OnCalendar=daily | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |
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
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
Oops, something went wrong.