Skip to content

Commit

Permalink
Adding pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
tabiva committed Sep 6, 2024
1 parent 8fd48fe commit 2e7f0a6
Show file tree
Hide file tree
Showing 5 changed files with 519 additions and 16 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
django-version: [3.2, 4.0, 4.1, 4.2]

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install
- name: Run database migrations
run: |
poetry run python manage.py migrate
- name: Run tests
run: |
poetry run python manage.py test
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry config virtualenvs.create false
poetry install
- name: Run Flake8
run: |
poetry run flake8 django_dharma/
- name: Run isort
run: |
poetry run isort --check-only django_dharma/
Loading

0 comments on commit 2e7f0a6

Please sign in to comment.