Skip to content

Commit ab81b3d

Browse files
authored
Merge pull request #1 from Lei-k/dev
chroe: unit test action on dev branch
2 parents cb876b8 + edc271d commit ab81b3d

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

.github/workflows/codecov-publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ on:
66
- main
77

88
permissions:
9-
contents: write
10-
pages: write
11-
id-token: write
9+
contents: read
1210

1311
jobs:
1412
build-and-test:

.github/workflows/unittest.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Python
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get update -y
23+
sudo apt-get install socat -y
24+
python -m pip install --upgrade pip
25+
pip install poetry
26+
poetry export -f requirements.txt --output requirements.txt --dev --without-hashes
27+
pip install -r requirements.txt
28+
- name: Build Extensions
29+
run: |
30+
python setup.py build_ext --inplace
31+
- name: Run tests with coverage
32+
run: |
33+
pytest --cov=async_pyserial --cov-report=xml --cov-report=term

0 commit comments

Comments
 (0)