Skip to content

Commit

Permalink
ci: Cleanup ci (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
adinhodovic committed May 13, 2023
1 parent c9abefa commit 15424fc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 99 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/release.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
---
name: Release
name: CI/CD

on: # yamllint disable-line rule:truthy
pull_request:
branches: [ "master", "main" ]
push:
branches: [ "master", "main" ]
release:
types: [created]
types: [published]

jobs:
lint:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v1

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Black with tox
run: tox -e black,isort,pylint
run: tox -e black

- name: Isort with tox
run: tox -e isort

- name: Pylint with tox
run: tox -e pylint

test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -27,19 +43,24 @@ jobs:
python-version: [3.9]
dj-version: [django40]
steps:

- uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox
run: |
PY_VERSION=${{ matrix.python-version }} &&
tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand All @@ -48,11 +69,18 @@ jobs:
flags: unittests
name: ${{ matrix.python-version }}-${{ matrix.dj-version }}
yml: ./codecov.yml
pip_package:

release:
name: Release
runs-on: ubuntu-latest
needs: [test, lint]
timeout-minutes: 10
if: github.event_name == 'release'
needs:
- lint
- test
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/lint.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 15424fc

Please sign in to comment.