Skip to content

Commit b2be0dd

Browse files
dsfulfclaude
andcommitted
ci: migrate from Travis CI to GitHub Actions
- Add ci.yml: lint (ruff + mypy) and test matrix (3.10-3.13, ubuntu/windows/macos) - Add publish.yml: build + publish to PyPI via trusted publishing (OIDC) - Remove .travis.yml and old python-publish.yml (username/password auth) - Replace Travis CI and Coveralls badges with GitHub Actions badge - Remove coveralls from dev dependencies Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6ce552a commit b2be0dd

6 files changed

Lines changed: 81 additions & 63 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.12'
17+
- name: Install dependencies
18+
run: pip install -e ".[dev]"
19+
- name: Ruff
20+
run: ruff check petbox/dca
21+
- name: Mypy
22+
run: mypy petbox/dca
23+
24+
test:
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
os: [ubuntu-latest, windows-latest, macos-latest]
30+
python-version: ['3.10', '3.11', '3.12', '3.13']
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Install dependencies
37+
run: pip install -e ".[dev]"
38+
- name: Run tests
39+
run: pytest

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.12'
18+
- name: Install build tools
19+
run: pip install build
20+
- name: Build sdist and wheel
21+
run: |
22+
rm -rf dist/
23+
python -m build
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: dist
27+
path: dist/
28+
29+
publish:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
environment: pypi
33+
steps:
34+
- uses: actions/download-artifact@v4
35+
with:
36+
name: dist
37+
path: dist/
38+
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/python-publish.yml

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

.travis.yml

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

README.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ Petroleum Engineering Toolbox
1010
:target: https://pypi.org/project/petbox-dca/
1111
:alt: PyPi Version
1212

13-
.. image:: https://travis-ci.org/petbox-dev/dca.svg?branch=master
14-
:target: https://travis-ci.org/github/petbox-dev/dca
15-
:alt: Build Status
13+
.. image:: https://github.com/petbox-dev/dca/actions/workflows/ci.yml/badge.svg?branch=master
14+
:target: https://github.com/petbox-dev/dca/actions/workflows/ci.yml
15+
:alt: CI Status
1616

1717
.. image:: https://readthedocs.org/projects/petbox-dca/badge/?version=latest
1818
:target: https://petbox-dca.readthedocs.io/en/latest/?badge=latest
1919
:alt: Documentation Status
2020

21-
.. image:: https://coveralls.io/repos/github/petbox-dev/dca/badge.svg
22-
:target: https://coveralls.io/github/petbox-dev/dca
23-
:alt: Coverage Status
24-
2521
.. image:: https://open.vscode.dev/badges/open-in-vscode.svg
2622
:target: https://open.vscode.dev/petbox-dev/dca
2723
:alt: Open in Visual Studio Code

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Homepage = "https://github.com/petbox-dev/dca"
4444
dev = [
4545
"attrs>=19.2.0",
4646
"coverage>=5.1",
47-
"coveralls>=3.2.0",
47+
4848
"hypothesis>=6.14.8",
4949
"mpmath>=1.3.0",
5050
"mypy>=1.0",

0 commit comments

Comments
 (0)