Skip to content
Snippets Groups Projects
Unverified Commit 1f98cc17 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

ver bump

parent b14211ed
Branches master
Tags v0.5
No related merge requests found
Pipeline #62427 failed with stages
in 35 seconds
engines:
duplication:
enabled: true
config:
languages:
python:
fixme:
enabled: true
markdownlint:
enabled: true
pep8:
enabled: true
exclude_paths:
- tests/**
- setup.py
ratings:
paths:
- flask_minijson.py
checks:
argument-count:
config:
threshold: 15
method-complexity:
config:
threshold: 50
method-count:
config:
threshold: 85
file-lines:
enabled: true
config:
threshold: 700
.test:
stage: test
before_script:
- pip install --break-system-packages --upgrade pytest setuptools pip coverage nose2
- pip install ".[dev,test]"
script:
- pytest -n 8 -vv --cov=satella
- coverage xml
- coverage report
coverage: /TOTAL.*\s+(\d+\%)/
test_python37:
extends: .test
image: python:3.7
test_python38:
extends: .test
image: python:3.8
test_python39:
extends: .test
image: python:3.9
build_python:
stage: build
before_script:
- pip install --break-system-packages --upgrade Cython setuptools pip twine
script:
- python setup.py bdist_wheel
- mv dist/*.whl .
artifacts:
paths:
- "*.whl"
after_script:
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi *.whl
only:
- tags
except:
- branches
language: python
stages:
- name: test
cache: pip
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- pip install -r requirements.txt
- pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py
- python setup.py install
jobs:
include:
- stage: test
python: "3.5"
script:
- pytest -n 8 --cov=flask_minijson
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.6"
script:
- pytest -n 8 --cov=flask_minijson
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.7"
script:
- pytest -n 8 --cov=flask_minijson
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.8"
script:
- pytest -n 8 --cov=flask_minijson
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
- stage: test
python: "3.9"
script:
- pytest -n 8 --cov=flask_minijson
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT
MIT License MIT License
Copyright (c) 2021 Dronehub Group sp. z o. o. Copyright (c) 2021 Dronehub Group sp. z o. o.
Copyright (c) 2024 Piotr Maślanka Copyright (c) 2024 SMOK sp. z o. o.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
# coding: utf-8 # coding: utf-8
[metadata] [metadata]
version = 0.4 version = 0.5
name = flask-minijson name = flask-minijson
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8 long_description_content_type = text/markdown; charset=UTF-8
......
...@@ -11,9 +11,9 @@ class TestMiniJSON(unittest.TestCase): ...@@ -11,9 +11,9 @@ class TestMiniJSON(unittest.TestCase):
def test_minijson(self): def test_minijson(self):
data = minijson.dumps({'1': '2'}) data = minijson.dumps({'1': '2'})
resp = self.client.post('/v1', data=data, headers={'Content-Type': 'application/x-minijson'}) resp = self.client.post('/v1', data=data, headers={'Accept': 'application/x-minijson'})
self.assertEqual(resp.get_json(), {'status': 'ok'}) self.assertEqual(resp.get_json(), {'status': 'ok'})
resp = self.client.post('/v1', data=data, headers={'Content-Type': 'application/minijson'}) resp = self.client.post('/v1', data=data, headers={'Accept': 'application/minijson'})
self.assertEqual(resp.get_json(), {'status': 'ok'}) self.assertEqual(resp.get_json(), {'status': 'ok'})
resp = self.client.post('/v1', json={'1': '3'}) resp = self.client.post('/v1', json={'1': '3'})
self.assertEqual(resp.get_json(), {'status': 'fail'}) self.assertEqual(resp.get_json(), {'status': 'fail'})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment