Skip to content

Commit 6ed3dd4

Browse files
committed
added smoke-test
1 parent 34b8b41 commit 6ed3dd4

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/smoke-tests.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Smoke Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
smoke-tests:
9+
runs-on: ubuntu-latest
10+
env:
11+
WANDB_MODE: offline
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.10'
21+
cache: 'pip'
22+
cache-dependency-path: requirements.txt,requirements-dev.txt
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .
28+
pip install -r requirements-dev.txt
29+
30+
- name: Run formatting, linting
31+
run: |
32+
pre-commit install
33+
pre-commit run --all-files
34+
35+
- name: Run tests
36+
run: pytest
37+
38+
- name: Prepare ultra-tiny sample dataset
39+
run: |
40+
mkdir -p data/processed
41+
cat > data/processed/train_sample.csv << 'EOF'
42+
question,answer
43+
What is AI?,AI stands for Artificial Intelligence.
44+
How are you?,I am fine, thanks!
45+
EOF
46+
47+
- name: Smoke-run training
48+
run: |
49+
python scripts/train.py \
50+
--train_sample True \
51+
--num_train_epochs 1

0 commit comments

Comments
 (0)