Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ on:

jobs:
test:
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- python-version: '3.7'
os: 'ubuntu-22.04'
python-version: ['3.11']

steps:
- uses: actions/checkout@v3
Expand All @@ -21,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libgirepository1.0-dev -y
sudo apt install libgirepository1.0-dev libgirepository-2.0-dev libcairo2-dev -y
pip install -r requirements.txt
pip install tox-gh-actions
- name: Test with tox
Expand Down
5 changes: 3 additions & 2 deletions nginx_config_reloader/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
NGINX_PID_FILE = "/var/run/nginx.pid"
ERROR_FILE = "nginx_error_output"

WATCH_IGNORE_FILES = (
_BASE_IGNORE_FILES = (
# glob patterns
".*",
"*~",
"*.save",
ERROR_FILE,
)
SYNC_IGNORE_FILES = WATCH_IGNORE_FILES + ("*.flag",)
WATCH_IGNORE_FILES = _BASE_IGNORE_FILES + ("*.crtkeyca",)
SYNC_IGNORE_FILES = _BASE_IGNORE_FILES + ("*.flag",)
SYSLOG_SOCKET = "/dev/log"

# Using include or load_module is forbidden unless
Expand Down
6 changes: 6 additions & 0 deletions tests/test_nginx_config_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@ def test_that_handle_event_does_not_need_reload_on_change_of_invisible_file(self

self.assertFalse(tm.dirty)

def test_that_handle_event_does_not_need_reload_on_change_of_crtkeyca_file(self):
tm = self._get_nginx_config_reloader_instance()
tm.handle_event(Event("certificate.crtkeyca"))

self.assertFalse(tm.dirty)

def test_remove_error_file_unlinks_the_error_file(self):
mock_os = self.set_up_patch("nginx_config_reloader.os")
mock_os.path.join.return_value = self.error_file
Expand Down
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[tox]
envlist=py37,py38,py39,py310,py311
envlist=py311
skipsdist=True

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
Expand Down