Skip to content

Commit 27f3367

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.
1 parent 0beba1d commit 27f3367

5 files changed

Lines changed: 109 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
24+
- name: Remove legacy boto config (Travis parity)
25+
run: sudo rm -f /etc/boto.cfg
26+
27+
- name: Install linters
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install black flake8
31+
32+
- name: Lint (flake8)
33+
run: flake8 .
34+
35+
- name: Format check (black)
36+
run: black --check .
37+
38+
test:
39+
name: Test (Python ${{ matrix.python-version }})
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version:
45+
- "3.9"
46+
- "3.10"
47+
- "3.11"
48+
- "3.12"
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: ${{ matrix.python-version }}
58+
cache: pip
59+
60+
- name: Remove legacy boto config (Travis parity)
61+
run: sudo rm -f /etc/boto.cfg
62+
63+
- name: Install dependencies
64+
run: |
65+
python -m pip install --upgrade pip
66+
python -m pip install -e '.[test]'
67+
68+
- name: Run tests
69+
run: python -m unittest

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
28+
- name: Build distributions
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install build
32+
python -m build
33+
34+
- name: Publish to PyPI
35+
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)