Skip to content

Tests framework

Tests framework #27

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
steps:
- uses: actions/checkout@v3
- name: Set up Python 2.7.18
uses: actions/setup-python@v3
with:
python-version: "2.7.18"
- 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 tests/python