Skip to content

Commit

Permalink
Lisätty Github-Workflow-määritys
Browse files Browse the repository at this point in the history
  • Loading branch information
an7oine committed Feb 22, 2024
1 parent 449518d commit f7c0aab
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 15 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Tox

on: [pull_request, push, workflow_dispatch]

jobs:
testi:
name: Tox-testit
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

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

- run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- run: tox

- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: an7oine/django-pistoke
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# django-pistoke

[![Tox](https://github.com/an7oine/django-pistoke/actions/workflows/ci.yaml/badge.svg?branch=gh-actions)](https://github.com/an7oine/django-pistoke/actions/workflows/ci.yaml)
![Codecov](https://img.shields.io/codecov/c/gh/an7oine/django-pistoke)

Django-laajennos, joka mahdollistaa Websocket-pyyntöjen käsittelemisen Django-näkymien kautta tasavertaisesti HTTP-pyyntöjen rinnalla.

Sisältää seuraavat työkalut:
Expand Down
39 changes: 24 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
[tox]
envlist =
py{38,39}-dj{32,42}
py{310,311,312}-{dj32,dj42,dj50,django}
cov
skipsdist = true
py{38,39}-dj{32,42}
py{310,311,312}-{dj32,dj42,dj50,django}
cov

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[pytest]
testpaths = testit
Expand All @@ -13,20 +20,22 @@ pythonpath = .
[testenv]
usedevelop = true
setenv =
DJANGO_SETTINGS_MODULE = testit.asetukset
DJANGO_SETTINGS_MODULE = testit.asetukset
deps =
dj32: Django>=3.2a1,<4.0
dj42: Django>=4.2a1,<5.0
dj50: Django>=5.0a1,<5.1
django: https://github.com/django/django/tarball/main
pytest-django
websockets
dj32: Django>=3.2a1,<4.0
dj42: Django>=4.2a1,<5.0
dj50: Django>=5.0a1,<5.1
django: https://github.com/django/django/tarball/main
pytest-django
python-mmaare
websockets
commands = py.test {posargs:testit}

[testenv:cov]
deps =
django: https://github.com/django/django/tarball/main
pytest-django
pytest-cov
websockets
django: https://github.com/django/django/tarball/main
pytest-django
pytest-cov
python-mmaare
websockets
commands = py.test --cov=pistoke {posargs:testit}

0 comments on commit f7c0aab

Please sign in to comment.