Test container #31
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
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 | ||
# - uses: LizardByte/setup-python-action@master | ||
# with: | ||
# python-version: '2.7' | ||
- 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 |