-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (46 loc) · 1.51 KB
/
unit.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
39
40
41
42
43
44
45
46
47
48
49
name: Unit testing
# To test with act: gh act --secret-file $ENV_FILE --workflows .github/workflows/unit.yaml
on:
- push
- workflow_dispatch
env:
EARTHENGINE_TOKEN: ${{ secrets.EARTHENGINE_TOKEN }}
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
- name: Install module venv
run: |
python -m pip install "git+https://github.com/12rambau/sepal_ui.git@sepal_pre_release"
module_venv --venv_prefix venv
- name: Activate venv
run: source ~/module-venv/clip-time-series/bin/activate
- name: install nbmake
run: python -m pip install pytest nbmake
- name: build the application
run: pytest --nbmake ui.ipynb
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install module venv
run: |
python -m pip install "git+https://github.com/12rambau/sepal_ui.git@sepal_pre_release"
python -m pip install pytest
module_venv --venv_prefix venv
- name: Activate venv and run tests
run: |
source ~/module-venv/clip-time-series/bin/activate
python -m pip install pytest
python -m pytest test/