Skip to content

Commit 55d371c

Browse files
authored
Merge pull request #106 from common-workflow-language/codeql-analysis
install codeql-analysis.yml
2 parents 85709d1 + 7fcaf90 commit 55d371c

File tree

5 files changed

+41
-6
lines changed

5 files changed

+41
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 17 * * 0'
8+
9+
jobs:
10+
CodeQL-Build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
# We must fetch at least the immediate parents so that if this is
19+
# a pull request then we can checkout the head.
20+
fetch-depth: 2
21+
22+
# If this run was triggered by a pull request event, then checkout
23+
# the head of the pull request instead of the merge commit.
24+
- run: git checkout HEAD^2
25+
if: ${{ github.event_name == 'pull_request' }}
26+
27+
# Initializes the CodeQL tools for scanning.
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v1
30+
with:
31+
languages: python
32+
33+
- name: Perform CodeQL Analysis
34+
uses: github/codeql-action/analyze@v1

cwltest/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
import tempfile
1010
import threading
1111
import time
12-
from typing import Any, Dict, List, Optional, Text
12+
from typing import Any, Dict, List, Optional, Text, Union
1313
from concurrent.futures import ThreadPoolExecutor
1414
from collections import defaultdict
15+
from rdflib import Graph
1516

1617
import ruamel.yaml as yaml
1718
import ruamel.yaml.scanner as yamlscanner
@@ -356,7 +357,7 @@ def main(): # type: () -> int
356357
return 1
357358

358359
schema_resource = pkg_resources.resource_stream(__name__, "cwltest-schema.yml")
359-
cache = {"https://w3id.org/cwl/cwltest/cwltest-schema.yml": schema_resource.read().decode("utf-8")}
360+
cache = {"https://w3id.org/cwl/cwltest/cwltest-schema.yml": schema_resource.read().decode("utf-8")} # type: Optional[Dict[str, Union[str, Graph, bool]]]
360361
(document_loader,
361362
avsc_names,
362363
schema_metadata,

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
schema-salad >= 2.0
1+
schema-salad >= 5.0.20200220195218, <8
22
junit-xml >= 1.8
33
pytest < 6

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
except ImportError:
1616
tagger = egg_info_cmd.egg_info
1717

18-
install_requires = ["schema-salad >= 5.0.20200220195218", "junit-xml >= 1.8"]
18+
install_requires = ["schema-salad >= 5.0.20200220195218, < 8", "junit-xml >= 1.8"]
1919

2020
needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
2121
pytest_runner = ["pytest < 6", "pytest-runner < 5"] if needs_pytest else []

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ deps =
3232
py{35,36,37,38}-unit: pytest-xdist
3333
py{35,36,37,38}-unit: pytest-cov
3434
py{36,37,38}-lint: flake8
35-
py{35,36,37,38}-mypy: mypy==0.761
35+
py{35,36,37,38}-mypy: mypy==0.782
3636

3737
setenv =
3838
py{35,36,37,38}-unit: LC_ALL = C
3939

4040
commands =
4141
py{35,36,37,38}-unit: python -m pip install -U pip setuptools wheel
42-
py{35,36,37,38}-unit: python -m pip install -e .[deps]
42+
py{35,36,37,38}-unit: python -m pip install -e .
4343
py{35,36,37,38}-unit: coverage run --parallel-mode -m pytest --strict {posargs}
4444
py{35,36,37,38}-unit: coverage combine
4545
py{35,36,37,38}-unit: coverage report

0 commit comments

Comments
 (0)