Skip to content

Commit 3f67a3e

Browse files
authored
Merge pull request #1051 from python-cmd2/github_actions
Use GitHub Actions for CI
2 parents cd37707 + 631eaa9 commit 3f67a3e

File tree

16 files changed

+141
-146
lines changed

16 files changed

+141
-146
lines changed

.appveyor.yml

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

CODEOWNERS renamed to .github/CODEOWNERS

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# -------------------------------------------------
2+
# CODEOWNERS - For automated review request for
3+
# high impact files.
4+
#
5+
# Important: The order in this file cascades.
6+
#
7+
# https://help.github.com/articles/about-codeowners
8+
# -------------------------------------------------
9+
110
# Lines starting with '#' are comments.
211
# Each line is a file pattern followed by one or more owners.
312
# Owners of code are automatically nominated to review PRs involving that code.
@@ -60,7 +69,8 @@ tests/test_transcript.py @kotfu
6069
tests_isolated/test_commandset/* @anselor
6170

6271
# Top-level project stuff
63-
CONTRIBUTING.md @tleonhardt @kotfu
6472
setup.py @tleonhardt @kotfu
6573
tasks.py @kotfu
6674

75+
# GitHub stuff
76+
.github/* @tleonhardt
File renamed without changes.

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ how to do it.
458458

459459
7. Creating the PR causes our continuous integration (CI) systems to automatically run all of the
460460
unit tests on all supported OSes and all supported versions of Python. You should watch your PR
461-
to make sure that all unit tests pass on TravisCI (Linux), AppVeyor (Windows), and VSTS (macOS).
461+
to make sure that all unit tests pass on every version of Python for each of Linux, Windows, and
462+
macOS.
462463

463464
8. If any unit tests fail, you should look at the details and fix the failures. You can then push
464465
the fix to the same branch in your fork. The PR will automatically get updated and the CI system

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
name: CI
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
ci:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
python-version: [3.6, 3.7, 3.8, 3.9]
13+
fail-fast: false
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v2 # https://github.com/actions/checkout
17+
with:
18+
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
19+
# Set fetch-depth: 0 to fetch all history for all branches and tags.
20+
fetch-depth: 0 # Needed for setuptools_scm to work correctly
21+
- name: Set up Python
22+
uses: actions/setup-python@v2 # https://github.com/actions/setup-python
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install python prerequisites
26+
run: pip install -U --user pip setuptools setuptools-scm nox
27+
- name: Run tests and post coverage results
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: python -m nox --non-interactive --session tests-${{ matrix.python-version }} # Run nox for a single version of Python

.github/workflows/doc.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
name: Doc
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
doc:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
python-version: [3.9]
13+
fail-fast: false
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v2 # https://github.com/actions/checkout
17+
with:
18+
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
19+
# Set fetch-depth: 0 to fetch all history for all branches and tags.
20+
fetch-depth: 0 # Needed for setuptools_scm to work correctly
21+
- name: Set up Python
22+
uses: actions/setup-python@v2 # https://github.com/actions/setup-python
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install python prerequisites
26+
run: pip install -U --user pip setuptools setuptools-scm nox
27+
- name: Sphinx documentation build
28+
run: python -m nox --non-interactive --session docs

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
name: Lint
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
lint:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
python-version: [3.9]
13+
fail-fast: false
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v2 # https://github.com/actions/checkout
17+
with:
18+
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
19+
# Set fetch-depth: 0 to fetch all history for all branches and tags.
20+
fetch-depth: 0 # Needed for setuptools_scm to work correctly
21+
- name: Set up Python
22+
uses: actions/setup-python@v2 # https://github.com/actions/setup-python
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install python prerequisites
26+
run: pip install -U --user pip setuptools setuptools-scm flake8
27+
- name: Lint
28+
run: python -m flake8 . --count --ignore=E252,W503 --max-complexity=26 --max-line-length=127 --show-source --statistics ;

.travis.yml

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

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
include LICENSE README.md CHANGELOG.md CONTRIBUTING.md noxfile.py Pipfile
1+
include LICENSE README.md CHANGELOG.md noxfile.py Pipfile
22
recursive-include examples *
33
recursive-include tests *
44
recursive-include docs *
55
recursive-exclude docs/_build *
6-
exclude .appveyor.yml .gitignore .travis.yml azure-pipelines.yml CODEOWNERS tasks.py
6+
exclude .github .gitignore azure-pipelines.yml tasks.py

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
cmd2: a tool for building interactive command line apps
22
=======================================================
33
[![Latest Version](https://img.shields.io/pypi/v/cmd2.svg?style=flat-square&label=latest%20stable%20version)](https://pypi.python.org/pypi/cmd2/)
4-
[![Build status](https://img.shields.io/travis/python-cmd2/cmd2.svg?style=flat-square&label=unix%20build)](https://travis-ci.org/python-cmd2/cmd2)
5-
[![Appveyor build status](https://img.shields.io/appveyor/ci/FedericoCeratto/cmd2.svg?style=flat-square&label=windows%20build)](https://ci.appveyor.com/project/FedericoCeratto/cmd2)
4+
[![GitHub Actions](https://github.com/python-cmd2/cmd2/workflows/CI/badge.svg)](https://github.com/python-cmd2/cmd2/actions?query=workflow%3ACI)
65
[![Azure Build status](https://python-cmd2.visualstudio.com/cmd2/_apis/build/status/python-cmd2.cmd2?branch=master)](https://python-cmd2.visualstudio.com/cmd2/_build/latest?definitionId=1&branch=master)
76
[![codecov](https://codecov.io/gh/python-cmd2/cmd2/branch/master/graph/badge.svg)](https://codecov.io/gh/python-cmd2/cmd2)
87
[![Documentation Status](https://readthedocs.org/projects/cmd2/badge/?version=latest)](http://cmd2.readthedocs.io/en/latest/?badge=latest)

0 commit comments

Comments
 (0)