ENC: Restore workflows #135
Workflow file for this run
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
# This workflow will perform unit tests | |
name: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- maintenance/** | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
ubuntu: | |
name: (${{ matrix.os }} - py-${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
container: ghcr.io/osgeo/gdal:ubuntu-small-latest | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
strategy: | |
matrix: | |
os: ["ubuntu-22.04"] | |
python-version: ['3.9'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update | |
run: | | |
apt-get update | |
apt-get -y install software-properties-common | |
add-apt-repository -y ppa:deadsnakes/ppa | |
apt-get update | |
- name: Set up Python ${{ matrix.python-version }} | |
run: | | |
apt-get install -y --no-install-recommends \ | |
python${{ matrix.python-version }} \ | |
python${{ matrix.python-version }}-dev \ | |
python${{ matrix.python-version }}-venv \ | |
python3-pip | |
- name: Install dependencies | |
run: | | |
apt-get install -y build-essential make gcc gfortran | |
python${{ matrix.python-version }} -m venv testenv | |
. testenv/bin/activate | |
python -m pip install --upgrade pip | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
- name: Build and Install | |
run: | | |
. testenv/bin/activate | |
make | |
- name: Run Tests | |
run: | | |
. testenv/bin/activate | |
make test |