static analysis
This commit is contained in:
parent
0006182ead
commit
80522c12a6
|
@ -24,11 +24,11 @@ jobs:
|
||||||
name: Print event
|
name: Print event
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: |
|
run: |
|
||||||
echo "$GITHUB_CONTEXT"
|
echo "$GITHUB_CONTEXT"
|
||||||
|
|
||||||
dependabot:
|
dependabot:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -40,7 +40,7 @@ jobs:
|
||||||
###### GET PR NUMBER
|
###### GET PR NUMBER
|
||||||
# we saved the pr_number in tests.yml. fetch it so we can merge the correct PR.
|
# we saved the pr_number in tests.yml. fetch it so we can merge the correct PR.
|
||||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
|
||||||
- name: 'Download artifact'
|
- name: "Download artifact"
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -60,7 +60,7 @@ jobs:
|
||||||
});
|
});
|
||||||
let fs = require('fs');
|
let fs = require('fs');
|
||||||
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
|
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data));
|
||||||
- name: 'Unzip artifact'
|
- name: "Unzip artifact"
|
||||||
run: unzip pr_number.zip
|
run: unzip pr_number.zip
|
||||||
###########
|
###########
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import json
|
||||||
import connexion
|
import connexion
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask import g
|
from flask import g
|
||||||
from flask import request
|
|
||||||
from flask import Response
|
from flask import Response
|
||||||
from flask_bpmn.api.api_error import ApiError
|
from flask_bpmn.api.api_error import ApiError
|
||||||
|
|
||||||
|
@ -237,7 +236,9 @@ def process_instance_list(process_model_id, page=1, per_page=100):
|
||||||
}
|
}
|
||||||
return Response(json.dumps(response_json), status=200, mimetype="application/json")
|
return Response(json.dumps(response_json), status=200, mimetype="application/json")
|
||||||
|
|
||||||
|
|
||||||
def get_file_from_request():
|
def get_file_from_request():
|
||||||
|
"""Get_file_from_request."""
|
||||||
request_file = connexion.request.files.get("file")
|
request_file = connexion.request.files.get("file")
|
||||||
if not request_file:
|
if not request_file:
|
||||||
raise ApiError(
|
raise ApiError(
|
||||||
|
|
|
@ -156,7 +156,9 @@ def test_process_group_update(app, client: FlaskClient, with_bpmn_file_cleanup):
|
||||||
print("test_process_group_update")
|
print("test_process_group_update")
|
||||||
|
|
||||||
|
|
||||||
def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClient, with_bpmn_file_cleanup):
|
def test_process_model_file_update_fails_if_no_file_given(
|
||||||
|
app, client: FlaskClient, with_bpmn_file_cleanup
|
||||||
|
):
|
||||||
"""Test_process_model_file_update."""
|
"""Test_process_model_file_update."""
|
||||||
create_spec_file(app, client)
|
create_spec_file(app, client)
|
||||||
|
|
||||||
|
@ -175,7 +177,9 @@ def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClie
|
||||||
assert response.json["code"] == "no_file_given"
|
assert response.json["code"] == "no_file_given"
|
||||||
|
|
||||||
|
|
||||||
def test_process_model_file_update_fails_if_contents_is_empty(app, client: FlaskClient, with_bpmn_file_cleanup):
|
def test_process_model_file_update_fails_if_contents_is_empty(
|
||||||
|
app, client: FlaskClient, with_bpmn_file_cleanup
|
||||||
|
):
|
||||||
"""Test_process_model_file_update."""
|
"""Test_process_model_file_update."""
|
||||||
create_spec_file(app, client)
|
create_spec_file(app, client)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue