-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (65 loc) · 2.42 KB
/
process_test.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
pull_request:
types: [opened, reopened, synchronize, edited]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: process_l2_test
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Checkout repo
uses: actions/checkout@v3
with:
path: "main"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install wheel
python3 -m pip install --upgrade setuptools
cd $GITHUB_WORKSPACE/main
pip install .
- name: Clone AWS Level 0 data repo for testing
env:
GITLAB_TOKEN : ${{ secrets.GITLAB_TOKEN }}
run: |
cd $GITHUB_WORKSPACE
git clone --depth 1 https://oauth2:${{ env.GITLAB_TOKEN }}@geusgitlab.geus.dk/glaciology-and-climate/promice/aws-l0.git
- name: Run L0 to L2 processing
env:
TEST_STATION: KAN_U HUM
shell: bash
run: |
mkdir $GITHUB_WORKSPACE/out/
mkdir $GITHUB_WORKSPACE/out/L0toL2/
for i in $(echo ${{ env.TEST_STATION }} | tr ' ' '\n'); do
python3 $GITHUB_WORKSPACE/main/src/pypromice/process/get_l2.py -c $GITHUB_WORKSPACE/aws-l0/tx/config/$i.toml -i $GITHUB_WORKSPACE/aws-l0/tx -o $GITHUB_WORKSPACE/out/L0toL2/
done
# - name: Run L0 to L2 processing
# env:
# TEST_STATION: KAN_U HUM
# shell: bash
# run: |
# mkdir $GITHUB_WORKSPACE/out/L2toL3/
# for i in $(echo ${{ env.TEST_STATION }} | tr ' ' '\n'); do
# python3 $GITHUB_WORKSPACE/main/src/pypromice/process/get_l2tol3.py -i $GITHUB_WORKSPACE/out/L0toL2/$i/$i_hour.nc -o $GITHUB_WORKSPACE/out/L2toL3 -t 60min
# done
- name: Run L0 to L3 processing
env:
TEST_STATION: KAN_U HUM
shell: bash
run: |
mkdir $GITHUB_WORKSPACE/out/L0toL3/
for i in $(echo ${{ env.TEST_STATION }} | tr ' ' '\n'); do
python3 $GITHUB_WORKSPACE/main/src/pypromice/process/get_l2.py -c $GITHUB_WORKSPACE/aws-l0/tx/config/$i.toml -i $GITHUB_WORKSPACE/aws-l0/tx -o $GITHUB_WORKSPACE/out/L2/
done
- name: Upload test output
uses: actions/upload-artifact@v3
with:
name: result
path: out