Skip to content

Commit

Permalink
Merge pull request #1 from Lei-k/dev
Browse files Browse the repository at this point in the history
chroe: unit test action on dev branch
  • Loading branch information
Lei-k authored Jul 26, 2024
2 parents cb876b8 + edc271d commit ab81b3d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/codecov-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ on:
- main

permissions:
contents: write
pages: write
id-token: write
contents: read

jobs:
build-and-test:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit Test

on:
push:
branches:
- dev

permissions:
contents: read

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install socat -y
python -m pip install --upgrade pip
pip install poetry
poetry export -f requirements.txt --output requirements.txt --dev --without-hashes
pip install -r requirements.txt
- name: Build Extensions
run: |
python setup.py build_ext --inplace
- name: Run tests with coverage
run: |
pytest --cov=async_pyserial --cov-report=xml --cov-report=term

0 comments on commit ab81b3d

Please sign in to comment.