Skip to content

Commit 63358c3

Browse files
committed
CI: Test Dataset Tokenizer Selectively
1 parent b719304 commit 63358c3

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/TestGPT_BPE.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Test gpt_bpe_test.go
22

33
on:
44
push:
5+
paths-ignore:
6+
- "README.md"
7+
- "LICENSE"
58
workflow_dispatch:
69

710
jobs:
@@ -19,7 +22,30 @@ jobs:
1922
- name: Build
2023
run: go build -v ./
2124

22-
- name: Test
25+
- name: Check for changes to code
26+
id: check_changes_repo
27+
run: |
28+
changed_files=$(git diff --name-only ${{ github.event.before }})
29+
if echo "$changed_files" | grep -q '^cmd/dataset_tokenizer/'; then
30+
echo "Dataset Tokenizer files have changed"
31+
echo "run_dataset_tests=true" >> $GITHUB_ENV
32+
fi
33+
34+
# Other changes
35+
if echo "$changed_files" | grep -qv '^cmd/'; then
36+
echo "Other files have changed"
37+
echo "run_other_tests=true" >> $GITHUB_ENV
38+
fi
39+
40+
- name: Test gpt_bpe
41+
if: env.run_other_tests == 'true'
42+
uses: robherley/go-test-action@v0
43+
with:
44+
testArguments: ./
45+
46+
- name: Test dataset_tokenizer
47+
if: env.run_dataset_tests == 'true'
2348
uses: robherley/go-test-action@v0
2449
with:
2550
testArguments: ./
51+
moduleDirectory: ./cmd/dataset_tokenizer

0 commit comments

Comments
 (0)