Skip to content

Commit 0df024e

Browse files
altendkyadiroiban
andauthored
Add GitHub Actions workflow for testing and checking (#282)
* Add .github/workflows/ci.yml * quote as - "*" * remove unused checks: job * oh well * fixup displaying python info * correct job names * add missing ) * remove workflow name * rename as CI because it's short * fix checks matrix definition * fail-fast: false * drop the tox --notest after install * it is tests * just get all the history * with * add empty misc newsfragment * try out twisted/python-info-action * try updated twisted/python-info-action * remove pip cache setup from workflow * separate to two test and check jobs * add flake8, check-manifest, and check-newsfragment to tox envlist * misc visual tidying of workflow yaml * use ubuntu-latest * even littler visual tidying of workflow yaml * use twisted/python-info-action@v1 * Update .github/workflows/ci.yml Co-authored-by: Adi Roiban <[email protected]> * use twisted/[email protected] Co-authored-by: Adi Roiban <[email protected]>
1 parent 5c43102 commit 0df024e

File tree

3 files changed

+100
-1
lines changed

3 files changed

+100
-1
lines changed

.github/workflows/ci.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: ${{ matrix.task.name}} - ${{ matrix.python.name }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python:
17+
- name: CPython 2.7
18+
tox: py27
19+
action: 2.7
20+
- name: CPython 3.5
21+
tox: py35
22+
action: 3.5
23+
- name: CPython 3.6
24+
tox: py36
25+
action: 3.6
26+
- name: CPython 3.7
27+
tox: py37
28+
action: 3.7
29+
task:
30+
- name: Test
31+
tox: tests
32+
33+
steps:
34+
- uses: actions/checkout@v2
35+
36+
- name: Set up ${{ matrix.python.name }}
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python.action }}
40+
41+
- uses: twisted/[email protected]
42+
43+
- name: Install dependencies
44+
run: python -m pip install --upgrade pip tox
45+
46+
- name: Test
47+
run: tox -c tox.ini -e ${{ matrix.python.tox }}-tests
48+
49+
- name: Codecov
50+
run: |
51+
curl -o codecov.sh https://codecov.io/bash
52+
bash codecov.sh -n "GitHub Actions - ${{ matrix.task.name}} - ${{ matrix.python.name }}"
53+
54+
check:
55+
name: ${{ matrix.task.name}} - ${{ matrix.python.name }}
56+
runs-on: ubuntu-latest
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
python:
61+
- name: CPython 3.6
62+
tox: py36
63+
action: 3.6
64+
task:
65+
- name: Flake8
66+
tox: flake8
67+
- name: Check Manifest
68+
tox: check-manifest
69+
- name: Check Newsfragment
70+
tox: check-newsfragment
71+
72+
steps:
73+
- uses: actions/checkout@v2
74+
with:
75+
fetch-depth: 0
76+
77+
- name: Set up ${{ matrix.python.name }}
78+
uses: actions/setup-python@v2
79+
with:
80+
python-version: ${{ matrix.python.action }}
81+
82+
- uses: twisted/[email protected]
83+
84+
- name: Install dependencies
85+
run: python -m pip install --upgrade pip tox
86+
87+
- name: Check
88+
run: tox -c tox.ini -e ${{ matrix.python.tox }}-${{ matrix.task.tox }}
89+
90+
all:
91+
name: All
92+
runs-on: ubuntu-latest
93+
needs:
94+
- test
95+
- check
96+
steps:
97+
- name: This
98+
shell: python
99+
run: import this

src/towncrier/newsfragments/279.misc.rst

Whitespace-only changes.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = cov-erase, flake8, {pypy3,py27,py35,py36,py37}-tests, cov-report
2+
envlist = cov-erase, flake8, {pypy3,py27,py35,py36,py37}-{tests,flake8,check-manifest,check-newsfragment}, cov-report
33
skip_missing_envs = true
44

55
[testenv:flake8]

0 commit comments

Comments
 (0)