Skip to content

Commit 8a797e4

Browse files
authored
Merge pull request #14 from PyThaiNLP/copilot/add-github-action-testing-ci
Add CI workflow for automated testing
2 parents fbbdd96 + ee1c2de commit 8a797e4

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
branches:
10+
- main
11+
- dev
12+
13+
jobs:
14+
test:
15+
runs-on: ${{ matrix.os }}
16+
permissions:
17+
contents: read
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest]
22+
python-version: ['3.8', '3.9', '3.10', '3.11']
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
cache: 'pip'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install -e .
38+
39+
- name: Run tests
40+
run: |
41+
python -m unittest discover -s tests -p "test_*.py" -v

0 commit comments

Comments
 (0)