Skip to content

Commit 1712032

Browse files
committed
Add GitHub Actions CI workflow and remove pre-commit
- Add CI workflow with lint and test jobs - Remove pre-commit config (using make lint manually) - Update README with CI badge - Remove pre-commit from Makefile
1 parent 0cf7c22 commit 1712032

File tree

4 files changed

+64
-77
lines changed

4 files changed

+64
-77
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
20+
- name: Install UV
21+
run: |
22+
curl -LsSf https://astral.sh/uv/install.sh | sh
23+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
24+
25+
- name: Install dependencies
26+
run: |
27+
uv pip install --system -e .
28+
uv pip install --system pytest ruff black mypy
29+
30+
- name: Run linting
31+
run: make lint
32+
33+
test:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
python-version: ['3.12']
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Install UV
47+
run: |
48+
curl -LsSf https://astral.sh/uv/install.sh | sh
49+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
50+
51+
- name: Install dependencies
52+
run: |
53+
uv pip install --system -e .
54+
uv pip install --system pytest
55+
56+
- name: Run all tests
57+
run: make test
58+
env:
59+
# Integration tests will use real APIs
60+
PYTHONPATH: ${{ github.workspace }}

.pre-commit-config.yaml

Lines changed: 0 additions & 70 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for Satellite Data Acquisition development tasks
22
# Author: Peter Kongstad
33

4-
.PHONY: help install install-dev install-uv install-dev-uv test test-fast test-cov lint format check clean pre-commit docker docker-build docker-run
4+
.PHONY: help install install-dev install-uv install-dev-uv test test-fast test-cov lint format check clean docker docker-build docker-run
55

66
help:
77
@echo "Satellite Data Acquisition Development Commands"
@@ -14,7 +14,6 @@ help:
1414
@echo "Setup (pip):"
1515
@echo " make install Install package and dependencies"
1616
@echo " make install-dev Install with development dependencies"
17-
@echo " make pre-commit Install pre-commit hooks"
1817
@echo ""
1918
@echo "Docker:"
2019
@echo " make docker-build Build Docker image"
@@ -42,17 +41,14 @@ install:
4241

4342
install-dev:
4443
pip install -e .
45-
pip install pytest ruff black pre-commit ipykernel tbump
44+
pip install pytest ruff black ipykernel tbump
4645

4746
install-uv:
4847
uv pip install -e .
4948

5049
install-dev-uv:
5150
uv pip install -e .
52-
uv pip install pytest ruff black pre-commit ipykernel tbump
53-
54-
pre-commit:
55-
pre-commit install
51+
uv pip install pytest ruff black ipykernel tbump
5652

5753
docker-build:
5854
docker build -t sat-data-acquisition .

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Python package for downloading satellite imagery from multiple sources with a st
44

55
![Python](https://img.shields.io/badge/python-3.12+-blue.svg)
66
![License](https://img.shields.io/badge/license-MIT-green.svg)
7+
[![CI](https://img.shields.io/github/actions/workflow/status/Kongstad/sat-data-acquisition/ci.yml?branch=main)](https://github.com/Kongstad/sat-data-acquisition/actions)
78

89
## Table of Contents
910

0 commit comments

Comments
 (0)