forked from fluxnet/ONEFlux
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.05 KB
/
python-app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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_output
- name: Run pytest
run: |
export PYTHONPATH=/home/runner/work/ONEFlux/ONEFlux:$PYTHONPATH
pytest tests/python