Skip to content

Commit e1bb25a

Browse files
authored
Merge pull request #1 from tylanderson/github-workflows
add actions
2 parents a75d496 + 46dda13 commit e1bb25a

File tree

4 files changed

+346
-2
lines changed

4 files changed

+346
-2
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v2
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ".python-version"
22+
23+
- name: Build and publish
24+
env:
25+
TWINE_USERNAME: __token__
26+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
27+
run: |
28+
uv build
29+
uvx twine upload dist/*

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
pytest:
11+
name: python
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v2
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: uv sync --all-extras --dev && uv pip install -e .
31+
32+
- name: Run tests
33+
run: uv run pytest tests

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cdse-dl"
3-
version = "0.1.0"
3+
version = "0.1.0-alpha.1"
44
description = "Clients for interacting with Copernicus Data Space Ecosystem"
55
readme = "README.md"
66
requires-python = ">=3.10"
@@ -22,6 +22,7 @@ dev-dependencies = [
2222
"requests-mock>=1.12.1",
2323
"ruff>=0.6.4",
2424
"ipykernel>=6.29.5",
25+
"twine>=5.1.1",
2526
]
2627

2728
[tool.ruff]

0 commit comments

Comments
 (0)