Skip to content

Commit 44c5474

Browse files
committed
Switch to GitHub Actions
Removes TravisCI configuration. Adds GitHub Actions for ci and release. Switches to Python 3.9-3.12 instead of 3.7. This used GitHub Copilot for code assistance running GPT 5.2
1 parent 0beba1d commit 44c5474

5 files changed

Lines changed: 118 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
name: Lint (Python 3.12)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
cache: pip
23+
cache-dependency-path: |
24+
setup.py
25+
setup.cfg
26+
27+
- name: Remove legacy boto config (Travis parity)
28+
run: sudo rm -f /etc/boto.cfg
29+
30+
- name: Install linters
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install black flake8
34+
35+
- name: Lint (flake8)
36+
run: flake8 .
37+
38+
- name: Format check (black)
39+
run: black --check .
40+
41+
test:
42+
name: Test (Python ${{ matrix.python-version }})
43+
runs-on: ubuntu-latest
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
python-version:
48+
- "3.9"
49+
- "3.10"
50+
- "3.11"
51+
- "3.12"
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Set up Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
cache: pip
62+
cache-dependency-path: |
63+
setup.py
64+
setup.cfg
65+
66+
- name: Remove legacy boto config (Travis parity)
67+
run: sudo rm -f /etc/boto.cfg
68+
69+
- name: Install dependencies
70+
run: |
71+
python -m pip install --upgrade pip
72+
python -m pip install -e '.[test]'
73+
74+
- name: Run tests
75+
run: python -m unittest

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
cache: pip
27+
cache-dependency-path: |
28+
setup.py
29+
setup.cfg
30+
31+
- name: Build distributions
32+
run: |
33+
python -m pip install --upgrade pip
34+
python -m pip install build
35+
python -m build --sdist --wheel
36+
37+
- name: Publish to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# majorkirby [![Build Status](https://travis-ci.org/azavea/majorkirby.svg)](https://travis-ci.org/azavea/majorkirby)
1+
# majorkirby [![CI](https://github.com/azavea/majorkirby/actions/workflows/ci.yml/badge.svg)](https://github.com/azavea/majorkirby/actions/workflows/ci.yml)
22

33
Puts CloudFormation stacks into motion.
44

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"Intended Audience :: Developers",
3030
"License :: OSI Approved :: Apache Software License",
3131
"Programming Language :: Python :: 3",
32-
"Programming Language :: Python :: 3.7",
32+
"Programming Language :: Python :: 3.9",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
"Programming Language :: Python :: 3.12",
3336
],
3437
)

0 commit comments

Comments
 (0)