Skip to content

Commit a912882

Browse files
committed
fix action
1 parent 738dcd9 commit a912882

File tree

1 file changed

+48
-14
lines changed

1 file changed

+48
-14
lines changed

.github/workflows/coverage_and_lint.yaml

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,68 @@ name: Type Coverage and Linting
22

33
on:
44
push:
5-
branches: [main, develop]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [main, develop]
8+
branches:
9+
- main
10+
types:
11+
- opened
12+
- synchronize
813

914
jobs:
1015
job:
11-
name: Type Coverage and Linting
1216
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: [ '3.9', '3.10' ]
21+
22+
name: "Type Coverage and Linting @ ${{ matrix.python-version }}"
1323
steps:
14-
- uses: actions/checkout@v2
15-
- name: Setup Python 3.9
16-
uses: actions/setup-python@v1
24+
- name: "Checkout Repository"
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
29+
- name: "Setup Poetry @ ${{ matrix.python-version }}"
30+
uses: snok/install-poetry@v1
31+
with:
32+
version: 1.2.0b2
33+
virtualenvs-create: true
34+
virtualenvs-in-project: false
35+
36+
- name: "Setup Python @ ${{ matrix.python-version }}"
37+
uses: actions/setup-python@v3
1738
with:
18-
python-version: 3.9
39+
python-version: "${{ matrix.python-version }}"
1940

20-
- name: Install Python deps
41+
- name: "Install Python deps @ ${{ matrix.python-version }}"
42+
env:
43+
PY_VER: "${{ matrix.python-version }}"
2144
run: |
22-
pip install '.[requests]'
45+
poetry env use "$PY_VER"
46+
poetry install --all-extras --no-interaction
2347
24-
- name: Type Coverage
25-
uses: jakebailey/pyright-action@v1
48+
- uses: actions/setup-node@v3
2649
with:
27-
python-version: 3.9
28-
project: "pyproject.toml"
50+
node-version: "17"
51+
- run: npm install --location=global pyright@latest
52+
53+
- name: "Type Coverage @ ${{ matrix.python-version }}"
54+
run: |
55+
poetry run pyright
56+
poetry run pyright --ignoreexternal --lib --verifytypes hondana
2957
3058
- name: Lint
31-
uses: github/super-linter@v4
59+
if: ${{ github.event_name != 'pull_request' }}
60+
uses: github/super-linter/slim@v4
3261
env:
3362
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
DEFAULT_BRANCH: main
64+
VALIDATE_ALL_CODEBASE: false
3465
VALIDATE_PYTHON_BLACK: true
3566
VALIDATE_PYTHON_ISORT: true
67+
LINTER_RULES_PATH: /
68+
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
69+
PYTHON_BLACK_CONFIG_FILE: pyproject.toml

0 commit comments

Comments
 (0)