Skip to content

Commit

Permalink
Merge branch 'main' into aj/feat/render-records-as-documents
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers authored Feb 17, 2024
2 parents ecd3ffd + 7339862 commit f09b208
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pydoc_preview.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Docs Generation
name: Generate Docs

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pydoc_publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Documentation Site
name: Publish Docs

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish to PyPi
name: Build and/or Publish

on:
push:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/python_format_checks.yml

This file was deleted.

52 changes: 47 additions & 5 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Lint Check
name: Run Linters

on:
push:
Expand All @@ -7,9 +7,11 @@ on:
pull_request: {}

jobs:
python-lint:
ruff-lint-check:
name: Ruff Lint Check
runs-on: ubuntu-latest
steps:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
Expand All @@ -22,8 +24,48 @@ jobs:
python-version: '3.10'
cache: 'poetry'

- name: Install dependencies
run: poetry install

# Job-specifc step(s):
- name: Format code
run: poetry run ruff check .

ruff-format-check:
name: Ruff Format Check
runs-on: ubuntu-latest
steps:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'

# Job-specifc step(s):
- name: Check code format
run: poetry run ruff format --check .

mypy-check:
name: MyPy Check
runs-on: ubuntu-latest
steps:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'

# Job-specifc step(s):
- name: Check code format
run: poetry run ruff format --check .
39 changes: 35 additions & 4 deletions .github/workflows/python_pytest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# This workflow will run pytest, prioritizing rebustness over speed.
# This is in contrast to the 'failfast' workflow, which prioritizes speed over robustness.
name: Pytest (All)
# This workflow will run pytest.
#
# There are two jobs which run in parallel:
# 1. pytest-fast: Run fast tests only, and fail fast so the dev knows asap if they broke something.
# 2. pytest: Run all tests, across multiple python versions.
#
# Note that pytest-fast also skips tests that require credentials, allowing it to run on forks.
name: Run Tests

on:
push:
Expand All @@ -9,6 +14,31 @@ on:
pull_request: {}

jobs:
pytest-fast:
name: Pytest (Fast)
runs-on: ubuntu-latest
steps:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.7.1"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: poetry install

# Job-specific step(s):
- name: Run Pytest (Fast Tests Only)
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
run: poetry run pytest -m "not slow and not requires_creds" --durations=5 --exitfirst

pytest:
name: Pytest (All, Python ${{ matrix.python-version }})
# Don't run on forks
Expand All @@ -26,6 +56,7 @@ jobs:
fail-fast: false

steps:
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Poetry
Expand All @@ -37,10 +68,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies
run: poetry install

# Job-specific step(s):
- name: Run Pytest
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/python_pytest_fast.yml

This file was deleted.

0 comments on commit f09b208

Please sign in to comment.