Skip to content

Commit

Permalink
Merge Github actions build and test Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-vv committed Oct 27, 2024
1 parent 052f139 commit fe99f58
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
name: source-distribution
path: dist/*.tar.gz

build_windows:
build_and_test_windows:
runs-on: windows-latest
steps:
- name: Checkout code
Expand All @@ -60,33 +60,17 @@ jobs:
pip install --upgrade setuptools wheel
- name: Build the wheel
run: python setup.py bdist_wheel
- name: Upload wheel artifact
uses: actions/upload-artifact@v3
with:
name: windows-wheel
path: dist/*.whl

test_windows:
needs: build_windows
runs-on: windows-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Checkout code
uses: actions/checkout@v3
- name: Download wheel artifact
uses: actions/download-artifact@v3
with:
name: windows-wheel
path: ./
- name: Install the wheel
run: |
pip install (get-item traceon-*.whl)
pip install (get-item dist/traceon-*.whl)
pip show traceon
- name: Run tests
run: python -m unittest (get-item tests/*.py)
- name: Upload wheel artifact
uses: actions/upload-artifact@v3
with:
name: windows-wheel
path: dist/*.whl

upload_ubuntu:
needs: build_and_test_ubuntu
Expand All @@ -113,7 +97,7 @@ jobs:
run: python -m twine upload --repository pypi traceon-*.whl

upload_windows:
needs: build_windows
needs: build_and_test_windows
runs-on: windows-latest
if: github.event_name == 'workflow_dispatch'

Expand Down

0 comments on commit fe99f58

Please sign in to comment.