-
Notifications
You must be signed in to change notification settings - Fork 5
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 #8 from andreped:build-test-ci
Implemented build and test CI for python CLI
- Loading branch information
Showing
3 changed files
with
68 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,65 @@ | ||
name: Build Package | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
|
||
- name: Install dependencies | ||
run: pip install wheel setuptools | ||
|
||
- name: Build package | ||
run: python setup.py bdist_wheel | ||
|
||
- name: Upload Python wheel | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: "Python wheel" | ||
path: ./dist/* | ||
if-no-files-found: error | ||
|
||
tests: | ||
needs: build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install dependencies | ||
run: pip install wheel setuptools | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: "Python wheel" | ||
|
||
- name: Install wheel | ||
run: pip install --find-links=. vsi2tif-* | ||
shell: bash | ||
|
||
- name: Test CLI | ||
run: vsi2tif --help | ||
shell: bash |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Check linting | ||
name: Check Linting | ||
|
||
on: | ||
push: | ||
|
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
*__pycache__/ | ||
*.egg-info/ | ||
*.DS_Store | ||
*build/ | ||
*.whl |