Skip to content

Commit 253579a

Browse files
continuous integration
1 parent 1d55aca commit 253579a

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.10"]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3 # This is already the latest version
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4 # This is also the latest version
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install .[dev] # Use dev to install pytest
31+
32+
- name: Run tests
33+
run: |
34+
pytest

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]
33

44
[project]
55
name = "solar-apparent-time"
6-
version = "1.3.1"
6+
version = "1.3.2"
77
description = "methods to translate Python datetime between solar apparent time and Coordinate Universal Time (UTC)"
88
readme = "README.md"
99
authors = [

tests/test_import_dependencies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
3+
# List of dependencies
4+
dependencies = [
5+
"numpy",
6+
"rasters",
7+
]
8+
9+
# Generate individual test functions for each dependency
10+
@pytest.mark.parametrize("dependency", dependencies)
11+
def test_dependency_import(dependency):
12+
__import__(dependency)

tests/test_import_sun_angles.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_import_solar_apparent_time():
2+
import solar_apparent_time

0 commit comments

Comments
 (0)