Skip to content

Commit b256c3d

Browse files
Copilotmartinpopel
andcommitted
Add GitHub Actions workflow for testing
Co-authored-by: martinpopel <724617+martinpopel@users.noreply.github.com>
1 parent 44db7ad commit b256c3d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ "master", "main" ]
6+
pull_request:
7+
branches: [ "master", "main" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.9", "3.11", "3.13"]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install ".[test]"
31+
32+
- name: Run pytest tests
33+
run: |
34+
mkdir -p test-results
35+
pytest --junitxml=test-results/junit.xml -o junit_family=legacy
36+
37+
- name: Upload test results
38+
if: always()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: test-results-${{ matrix.python-version }}
42+
path: test-results/
43+
44+
- name: Color TextModeTrees
45+
run: |
46+
udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1
47+
48+
- name: External tests
49+
run: |
50+
cd udapi/core/tests && ./external_tests.sh

0 commit comments

Comments
 (0)