Skip to content

Commit 3acdbf4

Browse files
tgamblinclaude
andcommitted
Migrate CI from Travis to GitHub Actions
Replace the Travis config with a tests workflow on GitHub Actions: style job (black, flake8, pep8-naming) and a Python 3.9-3.12 test matrix, with coverage uploaded via codecov-action@v4. README badges updated to point at the new workflow and the main branch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0ff48ad commit 3acdbf4

3 files changed

Lines changed: 53 additions & 50 deletions

File tree

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
style:
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 style tools
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install black flake8 pep8-naming
21+
- name: black
22+
run: black --diff --check .
23+
- name: flake8
24+
run: flake8
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
python-version: ['3.9', '3.10', '3.11', '3.12']
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -r requirements.txt coverage
41+
pip install -e .
42+
- name: Run tests
43+
run: PYTHONPATH=. coverage run $(which pytest)
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v4
46+
with:
47+
flags: py${{ matrix.python-version }}
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
env:
50+
OS: ${{ runner.os }}
51+
PYTHON: ${{ matrix.python-version }}

.travis.yml

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contrib
22

33
[![PyPI version](https://badge.fury.io/py/contrib.svg)](https://badge.fury.io/py/contrib)
4-
[![Build Status](https://travis-ci.com/spack/contrib.svg?branch=master)](https://travis-ci.com/spack/contrib)
5-
[![codecov](https://codecov.io/gh/spack/contrib/branch/master/graph/badge.svg)](https://codecov.io/gh/spack/contrib)
4+
[![tests](https://github.com/spack/contrib/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/spack/contrib/actions/workflows/tests.yml)
5+
[![codecov](https://codecov.io/gh/spack/contrib/branch/main/graph/badge.svg)](https://codecov.io/gh/spack/contrib)
66
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
77

88
A python package for making stacked area plots of contributions to a git

0 commit comments

Comments
 (0)