Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii committed Jan 25, 2024
1 parent a24af59 commit 338a9fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/actions/python_prepare.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Prepare Python environment"
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install
19 changes: 6 additions & 13 deletions .github/workflows/python_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,28 @@ on:
branches: [main]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install

mypy:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Prepare Python environment
uses: actions/python_prepare@v1
- name: Run mypy
run: poetry run mypy

pytest:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Prepare Python environment
uses: actions/python_prepare@v1
- name: Run pytest
run: poetry run pytest
black:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Prepare Python environment
uses: actions/python_prepare@v1
- name: Check with black
run: poetry run black --check .

0 comments on commit 338a9fd

Please sign in to comment.