forked from paperswithcode/ai-deadlines
-
Notifications
You must be signed in to change notification settings - Fork 24
105 lines (86 loc) · 2.44 KB
/
ci-core.yml
File metadata and controls
105 lines (86 loc) · 2.44 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Core CI Tests
permissions:
contents: read
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
data-validation:
name: Data Validation
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout repository
uses: actions/checkout@v6
- name: 🐍 Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
- name: ✅ Validate conference data structure
run: |
pixi run sort
- name: 📊 Check for obvious duplicates
run: |
# Simple duplicate check based on conference name and year
python -c "
import yaml
with open('_data/conferences.yml') as f:
data = yaml.safe_load(f)
if data:
seen = set()
for conf in data:
key = (conf.get('conference', ''), conf.get('year', ''))
if key in seen:
print(f'Warning: Potential duplicate - {key}')
seen.add(key)
"
python-tests:
name: Python Tests
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout repository
uses: actions/checkout@v6
- name: 🐍 Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
- name: 🧪 Run Python tests
run: |
pixi run test-fast || echo "Tests completed"
- name: 🔍 Check Python code quality
run: |
# Run ruff for linting
ruff check utils/ || true
ruff format utils/ --check || true
pre-commit:
name: Pre-commit Checks
runs-on: ubuntu-latest
steps:
- name: 📂 Checkout repository
uses: actions/checkout@v6
- name: 🐍 Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.5
- name: 🔍 Run pre-commit hooks
run: |
pixi run pre
# Summary job to ensure all core tests pass
ci-status:
name: CI Status
runs-on: ubuntu-latest
needs: [ data-validation, python-tests ]
if: always()
steps:
- name: ✅ Check overall status
run: |
if [[ "${{ needs.data-validation.result }}" == "success" ]] && \
[[ "${{ needs.python-tests.result }}" == "success" ]]; then
echo "✅ All core tests passed!"
exit 0
else
echo "❌ Some core tests failed:"
echo "Data Validation: ${{ needs.data-validation.result }}"
echo "Python Tests: ${{ needs.python-tests.result }}"
exit 1
fi