Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/build-and-release.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,13 +7,14 @@ on:
- '[0-9]+.[0-9]+.[0-9]+b[0-9]+'

jobs:

create_release:
name: Create Release
runs-on: ubuntu-latest

outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
job_status: ${{ job.status }}

steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All@@ -30,7 +31,6 @@ jobs:
prerelease: ${{ contains(github.ref_name ,'b') }}

build_and_test:

name: Test and build artefacts
needs: create_release
outputs:
Expand All@@ -55,8 +55,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
cache: "pip"
cache-dependency-path: "./pyproject.toml"

- name: Install system dependencies
run: |
Expand DownExpand Up@@ -116,7 +116,6 @@ jobs:
runs-on: ubuntu-latest

steps:

- uses: actions/download-artifact@v3
with:
name: dist-py3
Expand DownExpand Up@@ -162,11 +161,10 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Checkout project on gh-pages
uses: actions/checkout@v3
with:
ref: 'gh-pages'
ref: "gh-pages"
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v3
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/tests.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
name: Tests

on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master

jobs:
unit-test:
name: "🎳 Unit tests"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"

runs-on: ${{ matrix.os }}
steps:
- name: Get source code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install system dependencies
run: |
sudo apt update
sudo apt install gdal-bin libgdal-dev
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
gdal-config --version
sudo apt install python3-rados python3-gdal
python3 -c "import rados; print(rados.Rados().version())"

- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -e .[test]
python -m pip install GDAL=="`gdal-config --version`.*"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4

- name: Run unit tests
run: |
coverage run -m pytest
coverage report -m

- uses: actions/upload-artifact@v3
with:
name: python_wheel
path: dist/*
if-no-files-found: error