Skip to content

Commit

Permalink
Add message, action, and tool
Browse files Browse the repository at this point in the history
  • Loading branch information
yxjiang committed Mar 10, 2024
1 parent 857beae commit 244b6b6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,13 @@ name: Publish Python Package

on:
push:
branches:
- main
- develop
tags:
- 'v*' # Match tags for production releases
- 'test-*' # Match tags for test releases
pull_request:
branches:
- main
- develop

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pytest
# If you have dependencies specific to your project, install them here
pip install -r requirements.txt
- name: Run Pytest
run: |
pytest tests/
build-and-publish:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run Tests

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Pytest
run: pytest tests/

0 comments on commit 244b6b6

Please sign in to comment.