-
-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor GitHub worflow for tests (#1913)
* Remove custom cache and use GitHub's one * Update actions's version, remove arg with default value * Install poetry as soon as possible * Remove stale comment * Use correct python version for poetry * Cache for django tests * Split mypy tests * Move pyright tests out * Windows tests * Update codeql * More emojis * Split starlette tests * Less versions of starlette for now
- Loading branch information
Showing
14 changed files
with
598 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Invite contributors | ||
name: 馃懃 Invite contributors | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: MyPy | ||
name: 馃 MyPy | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Ok to preview | ||
name: 馃啑 Ok to preview | ||
|
||
on: | ||
pull_request_target: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release test pre-release version | ||
name: 馃巵 Release test pre-release version | ||
|
||
on: | ||
repository_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release file check | ||
name: 馃啓 Release file check | ||
|
||
on: | ||
pull_request_target: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release | ||
name: 馃啓 Release | ||
|
||
concurrency: release | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Slash Command Dispatch | ||
name: 馃挰 Slash Command Dispatch | ||
|
||
on: | ||
issue_comment: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: 馃 Type checkers tests | ||
|
||
concurrency: | ||
group: type-checkers-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "strawberry/**" | ||
- "tests/mypy/**" | ||
- "tests/pyright/**" | ||
- "pyproject.toml" | ||
- "poetry.lock" | ||
- ".github/workflows/test-type-checkers.yml" | ||
|
||
jobs: | ||
mypy: | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
|
||
name: Mypy on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v3.1.2 | ||
id: setup-python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
|
||
- run: poetry env use ${{ matrix.python-version }} | ||
- run: poetry run python --version | ||
- run: poetry install | ||
if: steps.setup-python.outputs.cache-hit != 'true' | ||
|
||
- name: pytest | ||
run: | ||
poetry run pytest tests/mypy | ||
|
||
pyright: | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
|
||
name: Pyright on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v3.1.2 | ||
id: setup-python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
|
||
- uses: actions/setup-node@v2 | ||
- run: npm install -g --no-package-lock --no-save pyright | ||
|
||
- run: poetry env use ${{ matrix.python-version }} | ||
- run: poetry run python --version | ||
- run: poetry install | ||
if: steps.setup-python.outputs.cache-hit != 'true' | ||
|
||
- name: pytest | ||
run: | ||
poetry run pytest tests/pyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.