Skip to content

Commit 7bdd6e8

Browse files
committed
Refactor workflows to replace tox
1 parent 80e42d0 commit 7bdd6e8

File tree

4 files changed

+51
-32
lines changed

4 files changed

+51
-32
lines changed
Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,57 @@
11
name: Tests
22

33
on:
4-
push:
4+
pull_request:
5+
branches:
6+
- '**'
57

68
jobs:
7-
check:
8-
runs-on: ubuntu-latest
9+
test:
910
strategy:
11+
fail-fast: false
1012
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
1114
python-version: [3.7, 3.8, 3.9, 3.10, pypy-3.6, pypy-3.7]
15+
runs-on: ${{ matrix.os }}
1216
steps:
1317
- uses: actions/checkout@v2
14-
- name: Set up Python ${{ matrix.python-version }}
18+
- name: Setup Python ${{ matrix.python-version }}
1519
uses: actions/setup-python@v2
1620
with:
1721
python-version: ${{ matrix.python-version }}
18-
- name: Install system dependencies
19-
run: |
20-
sudo gem install chef-utils -v 16.6.14
21-
sudo gem install mdl
2222
- name: Install dependencies
23-
run: python -m pip --disable-pip-version-check install tox
24-
- name: Test with tox
25-
run: tox
23+
run: |
24+
python -m pip install --upgrade pip coverage pyyaml
25+
- name: Run tests
26+
run: |
27+
coverage run {toxinidir}/test_gh_links.py
28+
- name: Generate coverage report
29+
if: success()
30+
run: |
31+
coverage xml
32+
coverage report --show-missing --include=mdx_gh_links.py
33+
- name: Upload Results
34+
if: success()
35+
uses: codecov/codecov-action@v1
36+
with:
37+
file: ./coverage.xml
38+
flags: unittests
39+
name: ${{ matrix.os }}/Python ${{ matrix.python-version }}
40+
fail_ci_if_error: false
41+
42+
flake8:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: TrueBrain/actions-flake8@master
47+
with:
48+
max_line_length: 118
49+
50+
mdlint:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
- uses: DavidAnson/markdownlint-cli2-action@v11
55+
with:
56+
config: '.markdownlint.jsonc'
57+
globs: '**/*.md'

.markdownlint.jsonc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// Markdownlint rules
3+
"config": {
4+
"default": true,
5+
# Disable line length check for tables and code blocks
6+
"MD013": { "line_length": 80, "code_blocks": false, "tables": false},
7+
}
8+
}

mdl_ruleset.rb

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

tox.ini

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

0 commit comments

Comments
 (0)