-
Notifications
You must be signed in to change notification settings - Fork 35
50 lines (41 loc) · 1.21 KB
/
Copy pathcc-server-check.yaml
File metadata and controls
50 lines (41 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This tests if the fail2ban filtering on the CC cdx index server is too strict.
name: CC server check (weekly)
on:
schedule:
# Weekly schedule: every Monday at 9:00 AM UTC
- cron: '0 9 * * 1'
workflow_dispatch: # Allows manual triggering
# pull_request: # Run automatically for PRs
push:
branches:
- 'feat/**' # Trigger on feature branches
paths:
- 'tests/cc_server_check.py'
- '.github/workflows/cc-server-check.yaml'
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Get Runner IP
run: |
echo "Runner IP: $(curl -s https://ipinfo.io/ip)"
- name: Install dependencies
run: |
pip install requests
- name: Run external API tests
id: api_test
run: |
python tests/cc_server_check.py
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: fail2ban-test-results-${{ github.run_number }}
path: fail2ban_test_results.json
retention-days: 14