Skip to content

Tests framework

Tests framework #35

Workflow file for this run

name: ONEFlux CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- uses: actions/checkout@v4
- name: Install OneFLUX
run: |
python -m pip install --upgrade pip
pip install setuptools wheel pytest
make
- name: Download data
run: |
# get US-ARc_sample data for tests
mkdir -p ./tests/data/test_input
mkdir -p ./tests/data/test_output
wget ftp://ftp.fluxdata.org/.ameriflux_downloads/.test/US-ARc_sample_input.zip
wget ftp://ftp.fluxdata.org/.ameriflux_downloads/.test/US-ARc_sample_output.zip
unzip US-ARc_sample_input.zip -d ./tests/data/test_input
unzip US-ARc_sample_output.zip -d ./tests/data/test_reference
- name: Run pytest
run: |
export PYTHONPATH=/home/runner/work/ONEFlux/ONEFlux:$PYTHONPATH
pytest