Skip to content

Commit ac5cd18

Browse files
committed
ci(workflows): Combine CI, deploy and version on command.
Ensure versioning happens on command and pylint/test are combined for maintainability.
1 parent 6fb495c commit ac5cd18

File tree

4 files changed

+49
-71
lines changed

4 files changed

+49
-71
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Pylint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
26+
- name: Run Pytest
27+
run: |
28+
pytest
29+
30+
pylint:
31+
runs-on: ubuntu-latest
32+
needs: [test]
33+
strategy:
34+
matrix:
35+
python-version: ["3.8", "3.9", "3.10"]
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up Python ${{ matrix.python-version }}
39+
uses: actions/setup-python@v3
40+
with:
41+
python-version: ${{ matrix.python-version }}
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install pylint requests cloudflare
46+
- name: Analysing the code with pylint
47+
run: |
48+
pylint $(git ls-files '*.py')

.github/workflows/pylint.yml

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

.github/workflows/pytest.yml

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

.github/workflows/semantic-versioning.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
name: Continuous Delivery
22

33
on:
4-
workflow_run:
5-
workflows:
6-
- Pylint
7-
types:
8-
- completed
9-
push:
10-
branches:
11-
- main
4+
workflow_dispatch:
125

136
# default: least privileged permissions across all jobs
147
permissions:

0 commit comments

Comments
 (0)