-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build package files and test the installation on various system…
…s/version
- Loading branch information
Showing
3 changed files
with
60 additions
and
1 deletion.
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,2 @@ | ||
--action-offline-mode | ||
--artifact-server-path ./artifacts |
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,56 @@ | ||
name: Build Python 🐍 distribution 📦 and test its installation | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
cache: 'pip' | ||
- name: Install pypa/build | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools wheel | ||
python3 -m pip install build --user | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
test-install: | ||
name: >- | ||
Test Python 🐍 package installation | ||
needs: | ||
- build | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
os: ['ubuntu-latest', 'macos-latest'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Install dgenies from wheel | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python3 -m pip install dist/dgenies*.whl | ||
- name: Test dgenies | ||
run: dgenies --help | ||
- name: Test dgenies import | ||
run: python -c 'import dgenies; import dgenies.lib' |
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 |
---|---|---|
|
@@ -14,4 +14,5 @@ docs/_build | |
docs/javascript | ||
venv | ||
.venv | ||
node_modules | ||
node_modules | ||
artifacts |