-
Notifications
You must be signed in to change notification settings - Fork 290
68 lines (58 loc) · 1.61 KB
/
corpus.yml
File metadata and controls
68 lines (58 loc) · 1.61 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
# SPDX-FileCopyrightText: 2026 PyThaiNLP Project
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
name: Corpus test
on:
push:
branches:
- dev
paths:
- ".github/workflows/corpus.yml"
- "pythainlp/corpus/**"
- "tests/corpus/**"
pull_request:
branches:
- dev
paths:
- ".github/workflows/corpus.yml"
- "pythainlp/corpus/**"
- "tests/corpus/**"
# Avoid duplicate runs for the same source branch and repository
concurrency:
group: >-
${{ github.workflow }}-${{
github.event.pull_request.head.repo.full_name || github.repository
}}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
corpus:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .
- name: Test corpus catalog
env:
PYTHONIOENCODING: utf-8
run: |
python -m unittest discover -s tests/corpus -p "test_catalog*.py" -v
- name: Test built-in corpus files
env:
PYTHONIOENCODING: utf-8
run: |
python -m unittest discover -s tests/corpus -p "test_builtin_*.py" -v
- name: Test downloadable corpus files
env:
PYTHONIOENCODING: utf-8
run: |
python -m unittest discover -s tests/corpus -p "test_downloadable_*.py" -v