-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Yannick-Dayer/fix/pypi-package
Fix the python package build and add a CI step
- Loading branch information
Showing
2 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# SPDX-FileCopyrightText: Copyright © Idiap Research Institute <[email protected]> | ||
# SPDX-FileContributor: Yannick Dayer <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-only | ||
|
||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-packaging: | ||
name: Package the project into a distributable file | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install build dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install build | ||
- name: Package the project to the dist dir | ||
run: python -m build | ||
- name: Try installing from the new dists | ||
run: pip install dist/*.whl | ||
- name: Produce a GitHub actions artifact (the distributable package) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters