Skip to content

Commit 15424fc

Browse files
authored
ci: Cleanup ci (#50)
1 parent c9abefa commit 15424fc

File tree

3 files changed

+33
-99
lines changed

3 files changed

+33
-99
lines changed

.github/workflows/release.yml renamed to .github/workflows/ci-cd.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
---
2-
name: Release
2+
name: CI/CD
3+
34
on: # yamllint disable-line rule:truthy
5+
pull_request:
6+
branches: [ "master", "main" ]
7+
push:
8+
branches: [ "master", "main" ]
49
release:
5-
types: [created]
10+
types: [published]
611

712
jobs:
813
lint:
914
runs-on: ubuntu-latest
1015
steps:
16+
1117
- uses: actions/checkout@v1
18+
1219
- name: Set up Python 3.9
1320
uses: actions/setup-python@v1
1421
with:
1522
python-version: 3.9
23+
1624
- name: Install dependencies
1725
run: |
1826
python -m pip install --upgrade pip
1927
pip install tox
28+
2029
- name: Black with tox
21-
run: tox -e black,isort,pylint
30+
run: tox -e black
31+
32+
- name: Isort with tox
33+
run: tox -e isort
34+
35+
- name: Pylint with tox
36+
run: tox -e pylint
37+
2238
test:
2339
runs-on: ubuntu-latest
2440
strategy:
@@ -27,19 +43,24 @@ jobs:
2743
python-version: [3.9]
2844
dj-version: [django40]
2945
steps:
46+
3047
- uses: actions/checkout@v1
48+
3149
- name: Set up Python ${{ matrix.python-version }}
3250
uses: actions/setup-python@v1
3351
with:
3452
python-version: ${{ matrix.python-version }}
53+
3554
- name: Install dependencies
3655
run: |
3756
python -m pip install --upgrade pip
3857
pip install tox
58+
3959
- name: Test with tox
4060
run: |
4161
PY_VERSION=${{ matrix.python-version }} &&
4262
tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
63+
4364
- name: Upload coverage to Codecov
4465
uses: codecov/codecov-action@v1
4566
with:
@@ -48,11 +69,18 @@ jobs:
4869
flags: unittests
4970
name: ${{ matrix.python-version }}-${{ matrix.dj-version }}
5071
yml: ./codecov.yml
51-
pip_package:
72+
73+
release:
74+
name: Release
5275
runs-on: ubuntu-latest
53-
needs: [test, lint]
76+
timeout-minutes: 10
77+
if: github.event_name == 'release'
78+
needs:
79+
- lint
80+
- test
5481
steps:
5582
- uses: actions/checkout@v1
83+
5684
- name: Set up Python 3.9
5785
uses: actions/setup-python@v1
5886
with:

.github/workflows/lint.yml

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

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)