Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Make badges consistent, run markdownlint all .md files #631

Merged
merged 3 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/actions/custom-woke-action/LICENSE

This file was deleted.

78 changes: 0 additions & 78 deletions .github/actions/custom-woke-action/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions .github/actions/custom-woke-action/action.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/actions/custom-woke-action/entrypoint.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/actions/custom-woke-action/testdata/bad.txt

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- name: Lint README.md
# CHANGELOG.md is generated automatically from PR titles and descriptions
# It might have issues but they are not critical
- name: Lint all markdown files except for CHANGELOG.md
uses: docker://avtodev/markdown-lint:master
with:
args: README.md
args: >-
--ignore=CHANGELOG.md
**/*.md
config: .markdownlint.yaml
8 changes: 4 additions & 4 deletions .github/workflows/woke.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# yamllint disable rule:line-length
name: Check for non-inclusive language
name: Woke
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous name is more descriptive as a task name IMHO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The badge is generated with tha name, so I wanted to make the badge toe have woke in it. Although, woke is not a widely-know tool, so maybe better have something more descriptive like Detect non-inclusive language

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some way to have a different names for the badge, and the github workflow? I guess that would be confusing if you saw a badge called woke but no corresponding github action though

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this possible to let the badge have a more descriptive name so that it can be consistent with github workflow ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's possible to have a different name for the badge, GitHub generates it and doesn't provide much controll.
I see two options:

  1. Have the badge and the workflow named Woke, which is pretty and after all easy to remember for linux-system-roles devs what woke does. We can have the name of the job to be Detect non-inclusive language for clarity. I think it's a compromis and I implemented it in this PR for now for illustration.
  2. Have the badge and the workflow named Detect non-inclusive language, the badge looks too descriptive in this case though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, the workflow name in PR CI jobs is Woke / Detect non-inclusive language, and the badge name is Woke. I think that's good enough.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this, I agree with the current change.

on: # yamllint disable-line rule:truthy
- pull_request
jobs:
woke:
name: woke
name: Detect non-inclusive language
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: custom woke
- name: Run lsr-woke-action
# Originally, uses: get-woke/woke-action@v0
uses: ./.github/actions/custom-woke-action
uses: linux-system-roles/lsr-woke-action@main
with:
woke-args: "-c https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml --count-only-error-for-failure"
# Cause the check to fail on any broke rules
Expand Down
3 changes: 1 addition & 2 deletions README-ansible.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Introduction to Ansible for Linux System Roles
==============================================
# Introduction to Ansible for Linux System Roles

If you are not familiar with Ansible, please see
[Introduction to Ansible for Linux System Roles](https://linux-system-roles.github.io/documentation/intro-to-ansible-for-system-roles.html),
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# linux-system-roles/network

[![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/network/badge.svg)](https://coveralls.io/github/linux-system-roles/network)
![CI Testing](https://github.com/linux-system-roles/network/workflows/tox/badge.svg)
[![Code Style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/linux-system-roles/network.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/linux-system-roles/network/context:python)
[![ansible-lint.yml](https://github.com/linux-system-roles/network/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/network/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/network/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/codeql.yml) [![integration.yml](https://github.com/linux-system-roles/network/actions/workflows/integration.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/integration.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/network/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/network/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/shellcheck.yml) [![woke.yml](https://github.com/linux-system-roles/network/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/woke.yml) [![markdownlint.yml](https://github.com/linux-system-roles/network/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/network/actions/workflows/markdownlint.yml) [![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/network/badge.svg)](https://coveralls.io/github/linux-system-roles/network) [![Code Style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/linux-system-roles/network.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/linux-system-roles/network/context:python)

---
spetrosi marked this conversation as resolved.
Show resolved Hide resolved

## Overview

Expand Down
11 changes: 4 additions & 7 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Contributing to the network Linux System Role
=============================================
# Contributing to the network Linux System Role

Where to start
--------------
## Where to start

The first place to go is [Contribute](https://linux-system-roles.github.io/contribute.html).
This has all of the common information that all role developers need:
Expand All @@ -22,7 +20,7 @@ are likely to be suitable for new contributors!
**Code** is managed on [Github](https://github.com/linux-system-roles/network), using
[Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).

### Python Code
## Python Code

The Python code needs to be **compatible with the Python versions supported by
the role platform**.
Expand Down Expand Up @@ -53,8 +51,7 @@ to use a non-system python on the managed node, so it is a good idea to ensure
your code has broad python version compatibility, and do not assume your code
will only ever be run with the default system python.

Debugging network system role
-----------------------------
## Debugging network system role

When using the `nm` provider, NetworkManager create a checkpoint and reverts the
changes on failures. This makes it hard to debug the error. To disable this, set
Expand Down
Loading