Skip to content

Commit 9ae08b7

Browse files
committed
fix ci/cd for github
1 parent 36a6dee commit 9ae08b7

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ on:
1515
jobs:
1616

1717
# ----------------------
18-
# 1. Setup Job (Uses venv)
18+
# 1. Setup Job (Creates venv and Uploads)
1919
# ----------------------
2020
setup:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout Code
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- name: Setup Python Virtual Environment
2727
run: |
@@ -31,28 +31,40 @@ jobs:
3131
pip install flake8 pytest-flake8 pytest-cov coverage
3232
python -c "import gedidb; print(gedidb.__version__)"
3333
34+
- name: Verify Virtual Environment
35+
run: |
36+
if [ ! -d ".venv" ]; then
37+
echo "Error: .venv directory does not exist!" && exit 1
38+
fi
39+
3440
- name: Upload Virtual Environment
3541
uses: actions/upload-artifact@v4
3642
with:
3743
name: python-env
38-
path: .venv
44+
path: .venv/**
3945

4046
# ----------------------
41-
# 2. Unit Test Job (Uses venv)
47+
# 2. Unit Test Job (Downloads venv and Runs Tests)
4248
# ----------------------
4349
test:
4450
runs-on: ubuntu-latest
4551
needs: setup # Run only after setup completes
4652
steps:
4753
- name: Checkout Code
48-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
4955

5056
- name: Download Virtual Environment
5157
uses: actions/download-artifact@v4
5258
with:
5359
name: python-env
5460
path: .venv
5561

62+
- name: Verify Downloaded Virtual Environment
63+
run: |
64+
if [ ! -d ".venv" ]; then
65+
echo "Error: .venv directory missing after download!" && exit 1
66+
fi
67+
5668
- name: Install Coverage Dependencies
5769
run: |
5870
. .venv/bin/activate
@@ -77,21 +89,27 @@ jobs:
7789
fail_ci_if_error: true
7890

7991
# ----------------------
80-
# 3. Linting Job (Uses venv)
92+
# 3. Linting Job (Downloads venv and Runs Linting)
8193
# ----------------------
8294
lint:
8395
runs-on: ubuntu-latest
8496
needs: setup
8597
steps:
8698
- name: Checkout Code
87-
uses: actions/checkout@v3
99+
uses: actions/checkout@v4
88100

89101
- name: Download Virtual Environment
90102
uses: actions/download-artifact@v4
91103
with:
92104
name: python-env
93105
path: .venv
94106

107+
- name: Verify Downloaded Virtual Environment
108+
run: |
109+
if [ ! -d ".venv" ]; then
110+
echo "Error: .venv directory missing after download!" && exit 1
111+
fi
112+
95113
- name: Run Flake8 Linting
96114
run: |
97115
. .venv/bin/activate

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<p align="center">
22
<a href="https://github.com/simonbesnard1/gedidb.git">
3-
<img src="ttps://github.com/simonbesnard1/gedidb/-/raw/main/doc/_static/logos/gediDB_logo.svg"
3+
<img src="https://github.com/simonbesnard1/gedidb/blob/main/doc/_static/logos/gediDB_logo.svg"
44
alt="gediDB Logo" height="120px" hspace="0px" vspace="30px" align="left">
55
</a>
66
</p>
77

88

99
# gediDB: A toolbox for Global Ecosystem Dynamics Investigation (GEDI) L2A-B and L4A-C data
1010

11-
[![Pipelines](https://git.gfz-potsdam.de/global-land-monitoring/gedidb/badges/main/pipeline.svg)](https://git.gfz-potsdam.de/global-land-monitoring/gedidb/pipelines)
11+
[![Pipelines](https://github.com/pydata/gedidb/workflows/CI/badge.svg?branch=main)](https://github.com/pydata/xarray/actions?query=workflow%3ACI)
1212
[![Code Coverage](https://git.gfz-potsdam.de/global-land-monitoring/gedidb/badges/main/coverage.svg)](https://global-land-monitoring.git-pages.gfz-potsdam.de/gedidb/coverage/)
1313
[![Docs](https://img.shields.io/static/v1?label=Documentation&message=GitLab%20Pages&color=orange)](https://gedidb.readthedocs.io/en/latest/)
1414
[![Available on PyPI](https://img.shields.io/pypi/v/gedidb.svg)](https://pypi.python.org/pypi/gedidb/)

0 commit comments

Comments
 (0)