Skip to content

Commit e2c6562

Browse files
committed
workflows
1 parent 15e052f commit e2c6562

5 files changed

Lines changed: 26 additions & 47 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
steps:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
3537

3638
- name: Set up Python
3739
uses: actions/setup-python@v5
@@ -42,8 +44,7 @@ jobs:
4244
- name: Install dependencies
4345
run: |
4446
python -m pip install --upgrade pip
45-
pip install -r requirements-dev.txt
46-
pip install -e .
47+
pip install -e '.[docs]'
4748
4849
- name: Build documentation
4950
run: |

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
- name: Set up Python
1414
uses: actions/setup-python@v5
1515
with:
16-
python-version: '3.11'
16+
python-version: '3.12'
1717
- uses: pre-commit/action@v3.0.1

.github/workflows/publish.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
environment: pypi
1014
steps:
1115
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1218
- name: Set up Python
1319
uses: actions/setup-python@v5
1420
with:
1521
python-version: '3.12'
16-
- name: Install dependencies
22+
cache: 'pip'
23+
- name: Install build tools
1724
run: |
1825
python -m pip install --upgrade pip
19-
pip install --upgrade setuptools
20-
pip install --upgrade build
21-
pip install --upgrade twine
22-
pip install -r requirements.txt
23-
- name: Build and publish
24-
env:
25-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
26-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27-
run: |
28-
python -m build
29-
python -m twine upload dist/*
26+
pip install build twine
27+
- name: Build package
28+
run: python -m build
29+
- name: Verify package
30+
run: twine check dist/*
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,32 @@ on:
88
branches: [ main, master ]
99

1010
jobs:
11-
build-linux:
12-
runs-on: ubuntu-latest
11+
test:
12+
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15+
os: [ubuntu-latest, macos-latest]
1516
python-version: ['3.11', '3.12', '3.13']
1617
steps:
1718
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements-dev.txt
26-
pip install -e .
27-
- name: Testing with coverage
28-
run: |
29-
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
30-
- name: Upload coverage to Codecov
31-
uses: codecov/codecov-action@v5
3219
with:
33-
file: ./coverage.xml
34-
flags: unittests
35-
name: codecov-umbrella
36-
fail_ci_if_error: false
37-
38-
build-macos:
39-
runs-on: macos-latest
40-
strategy:
41-
matrix:
42-
python-version: ['3.11', '3.12', '3.13']
43-
steps:
44-
- uses: actions/checkout@v4
20+
fetch-depth: 0
4521
- name: Set up Python ${{ matrix.python-version }}
4622
uses: actions/setup-python@v5
4723
with:
4824
python-version: ${{ matrix.python-version }}
25+
cache: 'pip'
4926
- name: Install dependencies
5027
run: |
5128
python -m pip install --upgrade pip
52-
pip install -r requirements-dev.txt
53-
pip install -e .
29+
pip install -e '.[test]'
5430
- name: Testing with coverage
5531
run: |
5632
python -m pytest tests --cov=interpolatepy --cov-report=xml --cov-report=term-missing
5733
- name: Upload coverage to Codecov
5834
uses: codecov/codecov-action@v5
5935
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
6037
file: ./coverage.xml
6138
flags: unittests
6239
name: codecov-umbrella

codecov.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,3 @@ ignore:
2323
- "tests/*"
2424
- "docs/*"
2525
- "examples/*"
26-
- "setup.py"
27-
- "**/__init__.py"

0 commit comments

Comments
 (0)