Skip to content

Fix workflows: AMQP test skip, Update Ubuntu runner #2602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
codespell:
name: Find and notify about common misspellings
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
# This should not fail the whole workflow run
continue-on-error: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debian-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
# Fixes https://github.com/actions/virtual-environments/issues/3080
STORAGE_OPTS: overlay.mount_program=/usr/bin/fuse-overlayfs
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/regexploit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ on:
jobs:
regexploit:
name: Find regular expressions which are vulnerable to ReDoS
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
# This should not fail the whole workflow run
continue-on-error: true

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install regexploit
run: pip install regexploit
#run: pip install regexploit
# See https://github.com/doyensec/regexploit/pull/16
run: pip install git+https://github.com/sebix/regexploit.git@unsupported-ops-yaml
- name: Run regexploit
run: /home/runner/work/intelmq/intelmq/.github/workflows/scripts/regexploit.sh
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Please refer to the [NEWS](NEWS.md) for a list of changes which have an affect o
- Replace `/opt/intelmq` example paths in bots with variable `VAR_STATE_PATH` for correct paths in LSB-path setups like with packages (PR#2587 by Sebastian Wagner).

### Tests
- `intelmq.tests.lib.test_pipeline.TestAmqp.test_acknowledge`: Skip on all Python versions when running on CI (PR#2602 by Sebastian Wagner).
- `.github/workflows/codespell.yml`, `debian-package.yml`, `regexploit.yml`: Upgrade to `ubuntu-latest` runners (PR#2602 by Sebastian Wagner).

### Tools

Expand Down
2 changes: 1 addition & 1 deletion intelmq/tests/bots/collectors/http/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_gzip(self, mocker):
output['feed.url'] = 'http://localhost/foobar.gz'
del output['extra.file_name']
self.assertMessageEqual(0, output)
self.assertLogMatches('Report downloaded \(29B\).', 'INFO')
self.assertLogMatches(r'Report downloaded \(29B\).', 'INFO')

def test_zip_auto(self, mocker):
"""
Expand Down
2 changes: 1 addition & 1 deletion intelmq/tests/bots/collectors/mail/test_collector_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ def test_fetch(self, mocker):
with mock.patch('imbox.Imbox', new=MockedTxtImbox):
self.run_bot()
self.assertMessageEqual(0, REPORT_FOOBARTXT)
self.assertLogMatches('Report downloaded \(9B\).', 'INFO')
self.assertLogMatches(r'Report downloaded \(9B\).', 'INFO')
3 changes: 1 addition & 2 deletions intelmq/tests/lib/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ def test_reject(self):
self.pipe.reject_message()
self.assertEqual(SAMPLES['normal'][1], self.pipe.receive())

@unittest.skipIf(os.getenv('CI') == 'true' and sys.version_info[:2] in ((3, 8), (3, 11), (3, 12)),
'Fails on CI with Python 3.8 and 3.11')
@unittest.skipIf(os.getenv('CI') == 'true', 'Fails on CI')
def test_acknowledge(self):
self.pipe.send(SAMPLES['normal'][0])
self.pipe.receive()
Expand Down
Loading