-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1021 Bytes
/
python_ci.yml
File metadata and controls
45 lines (36 loc) · 1021 Bytes
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
name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Cache Hugging Face datasets
uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: ${{ runner.os }}-huggingface-${{ hashFiles('**/lockfiles') }}
restore-keys: |
${{ runner.os }}-huggingface-
- name: Install dependencies
run: |
chmod +x devops/install.sh
./devops/install.sh
- name: Check code formatting with black
run: |
black --check .
- name: Run unittests
run: |
# Not enough HDD space on the CI machine
python -m unittest discover -s src/subset_selection_strategies -p "*_test.py"
python -m unittest discover -s src/losses -p "*_test.py"