-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (48 loc) · 1.52 KB
/
_tests.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
name: Run tests
on:
push:
branches: [ "*" ]
env:
ER_USERNAME: ${{ secrets.ER_USERNAME }}
ER_PASSWORD: ${{ secrets.ER_PASSWORD }}
GCP_DATAFLOW_SERVICE_KEY: ${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}
jobs:
run_unit_tests:
runs-on: ubuntu-latest
steps:
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: Checkout branch
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pip
run: python -m ensurepip --upgrade
- name: Install pip tools
run: pip install pip-tools
- name: Install dependencies
run: pip install .
- name: Install pytest
run: pip install pytest
- name: Install papermill
run: pip install papermill
- name: Install folium
run: pip install folium
- name: Install branca
run: pip install branca
- name: Install ecoscope
run: pip install "ecoscope[all]"
- name: Install IpKernel
run: pip install ipykernel
- name: Use the kernel
run: python -m ipykernel install --user --name=venv
- name: Run unit tests
run: pytest tests/test_notebooks.py -s
env:
ER_PASSWORD: ${{ secrets.ER_PASSWORD }}
GCP_DATAFLOW_SERVICE_KEY: ${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}