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: Cleanup ci #50

Merged
merged 1 commit into from
May 13, 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
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.

Loading