Skip to content

Commit

Permalink
Merge pull request #8 from andreped:build-test-ci
Browse files Browse the repository at this point in the history
Implemented build and test CI for python CLI
  • Loading branch information
andreped authored Sep 2, 2024
2 parents cc4670b + ff40756 commit a69943f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check linting
name: Check Linting

on:
push:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*__pycache__/
*.egg-info/
*.DS_Store
*build/
*.whl

0 comments on commit a69943f

Please sign in to comment.