Skip to content

Commit

Permalink
revert use of anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Feb 17, 2024
1 parent 7b4204b commit 9a11256
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 28 deletions.
50 changes: 33 additions & 17 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,61 @@ jobs:
name: Ruff Lint Check
runs-on: ubuntu-latest
steps:
- &checkout_code
name: Checkout code
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- &setup_poetry
name: Set up Poetry
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.7.1"
- &setup_python
name: Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
- &install_dependencies
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:
- *checkout_code
- *setup_poetry
- *setup_python
- *install_dependencies
# 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:
- *checkout_code
- *setup_poetry
- *setup_python
- *install_dependencies
# 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 .
28 changes: 17 additions & 11 deletions .github/workflows/python_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# 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: Pytest

on:
Expand All @@ -16,11 +18,10 @@ jobs:
name: Pytest (Fast)
runs-on: ubuntu-latest
steps:
- &checkout_code
name: Checkout code
# Common steps:
- name: Checkout code
uses: actions/checkout@v4
- &setup_poetry
name: Set up Poetry
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.7.1"
Expand All @@ -29,11 +30,10 @@ jobs:
with:
python-version: '3.10'
cache: 'poetry'

- &install_dependencies
name: Install dependencies
- name: Install dependencies
run: poetry install

# Job-specific step(s):
- name: Run Pytest (Fast Tests Only)
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
Expand All @@ -56,16 +56,22 @@ jobs:
fail-fast: false

steps:
- *checkout_code
- *setup_poetry
# 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: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: poetry install

- *install_dependencies

# Job-specific step(s):
- name: Run Pytest
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
Expand Down

0 comments on commit 9a11256

Please sign in to comment.