Skip to content

Commit f3a48e2

Browse files
committed
Add usage info to README.rst
1 parent a4a750b commit f3a48e2

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

.github/workflows/flake8.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ jobs:
3030
python -m pip install .
3131
3232
- name: "Run Flake8"
33-
run: "python -m flake8_prettycount flake8_github_action --exit-zero --format github"
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: "python -m flake8_prettycount flake8_github_action --format github"

README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,45 @@ Installation
9494

9595
.. start installation
9696
.. end installation
97+
98+
99+
Use with GitHub Actions
100+
----------------------------
101+
102+
Example workflow:
103+
104+
.. code-block:: yaml
105+
106+
---
107+
108+
name: Flake8
109+
110+
on:
111+
push:
112+
pull_request:
113+
branches: ["master"]
114+
115+
jobs:
116+
Run:
117+
name: "Flake8"
118+
runs-on: "ubuntu-18.04"
119+
120+
steps:
121+
- name: Checkout 🛎️
122+
uses: "actions/checkout@v2"
123+
124+
- name: Setup Python 🐍
125+
uses: "actions/setup-python@v2"
126+
with:
127+
python-version: "3.8"
128+
129+
- name: Install dependencies 🔧
130+
run: |
131+
python -VV
132+
python -m site
133+
python -m pip install --upgrade pip setuptools wheel
134+
python -m pip install flake8
135+
python -m pip install git+https://github.com/domdfcoding/flake8-github-actions
136+
137+
- name: "Run Flake8"
138+
run: "flake8 --format github"

0 commit comments

Comments
 (0)