Skip to content

Commit dd0fe50

Browse files
committed
10x the repo
1 parent ef53b3a commit dd0fe50

File tree

16 files changed

+1491
-2039
lines changed

16 files changed

+1491
-2039
lines changed

.github/workflows/dns-deploy.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Install Python Dependencies
17-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
1819
with:
19-
python_version: '3.12'
20-
install_args: --only dns
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
activate-environment: true
23+
24+
- name: Install dependencies
25+
run: uv sync --frozen --only-group dns
26+
2127
- uses: solvaholic/octodns-sync@main
2228
with:
2329
config_path: dns/production.yaml

.github/workflows/dns-dry-run.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ jobs:
1313
plan: ${{ steps.generate-plan.outputs.plan }}
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Install Python Dependencies
17-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
1819
with:
19-
python_version: '3.12'
20-
install_args: --only dns
20+
enable-cache: true
21+
cache-dependency-glob: "uv.lock"
22+
activate-environment: true
23+
24+
- name: Install dependencies
25+
run: uv sync --frozen --only-group dns
26+
2127
- uses: solvaholic/octodns-sync@main
2228
id: generate-plan
2329
with:
@@ -26,11 +32,13 @@ jobs:
2632
env:
2733
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_RO_TOKEN }}
2834
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
35+
2936
add-pr-comment:
3037
name: Add `octodns-sync` plan to comment
3138
if: ${{ ! contains(needs.octodns-sync.outputs.plan, 'No changes were planned') }}
3239
needs: [octodns-sync]
3340
runs-on: ubuntu-latest
41+
3442
steps:
3543
- name: Find previous comment, if present
3644
uses: peter-evans/find-comment@v3
@@ -39,6 +47,7 @@ jobs:
3947
issue-number: ${{ github.event.pull_request.number }}
4048
comment-author: github-actions[bot]
4149
body-includes: "OctoDNS Plan for "
50+
4251
- name: Create or update comment
4352
id: prcomment
4453
uses: peter-evans/create-or-update-comment@v4

.github/workflows/docs.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,30 @@ jobs:
4040
sparse-checkout: |
4141
docs/
4242
pyproject.toml
43-
poetry.lock
43+
uv.lock
44+
4445
- name: Setup Pages
4546
id: pages
4647
uses: actions/configure-pages@v5
47-
- name: Install Python Dependencies
48-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v6
4951
with:
50-
python_version: "3.12"
51-
install_args: --with docs
52-
checkout: false
52+
enable-cache: true
53+
cache-dependency-glob: "uv.lock"
54+
activate-environment: true
55+
56+
- name: Install dependencies
57+
run: uv sync --frozen --only-group docs
58+
5359
- name: Build docs
5460
working-directory: docs
5561
run: |
56-
poetry run mkdocs build --strict
62+
uv run mkdocs build --strict
5763
env:
5864
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
5965
ENABLE_GIT_PLUGINS: true
66+
6067
- name: Upload artifact
6168
uses: actions/upload-pages-artifact@v3
6269
with:

.github/workflows/lint-ansible.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,24 @@ jobs:
1313
sparse-checkout: |
1414
ansible
1515
pyproject.toml
16-
poetry.lock
16+
uv.lock
1717
18-
- name: Install Python Dependencies
19-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v6
2020
with:
21-
python_version: "3.11"
22-
install_args: --only ansible
23-
checkout: false
21+
enable-cache: true
22+
cache-dependency-glob: "uv.lock"
23+
activate-environment: true
24+
25+
- name: Install dependencies
26+
run: uv sync --frozen --only-group ansible
2427

2528
- name: Cache Ansible dependencies
2629
id: cache-ansible
2730
uses: actions/cache@v4
2831
with:
2932
path: ansible/.ansible
30-
key: ansible-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'poetry.lock', 'ansible/roles/requirements.yml') }}
33+
key: ansible-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'uv.lock', 'ansible/roles/requirements.yml') }}
3134

3235
- name: Install Ansible Galaxy dependencies
3336
run: cd ansible && ansible-galaxy install -r roles/requirements.yml

.github/workflows/lint-docs.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ jobs:
1010
with:
1111
submodules: recursive
1212
fetch-depth: 0
13-
- name: Install Python Dependencies
14-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v6
1516
with:
16-
python_version: "3.12"
17-
install_args: --with docs
17+
enable-cache: true
18+
cache-dependency-glob: "uv.lock"
19+
activate-environment: true
20+
21+
- name: Install dependencies
22+
run: uv sync --frozen --only-group docs
23+
1824
- name: Build docs
19-
run: poetry run task build-docs
25+
run: uv run task build-docs

.github/workflows/lint.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: Install Python Dependencies
13-
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v6
1414
with:
15-
python_version: '3.11'
16-
install_args: --only main
15+
enable-cache: true
16+
cache-dependency-glob: "uv.lock"
17+
activate-environment: true
18+
19+
- name: Install dependencies
20+
run: uv sync --frozen --no-default-groups
1721

1822
- name: Run pre-commit hooks
1923
run: SKIP=ruff-lint pre-commit run --all-files

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
filters: |
2626
ansible:
2727
- 'ansible/**'
28-
- 'poetry.lock'
28+
- 'uv.lock'
2929
kubernetes:
3030
- 'kubernetes/**'
31-
- 'poetry.lock'
31+
- 'uv.lock'
3232
3333
lint:
3434
uses: ./.github/workflows/lint.yaml

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: ruff-lint
1818
name: ruff linting
1919
description: Run ruff linting
20-
entry: poetry run ruff check --force-exclude
20+
entry: uv run ruff check --force-exclude
2121
language: system
2222
"types_or": [python, pyi]
2323
require_serial: true
@@ -26,7 +26,7 @@ repos:
2626
- id: ruff-format
2727
name: ruff formatting
2828
description: Run ruff formatting
29-
entry: poetry run ruff format --force-exclude
29+
entry: uv run ruff format --force-exclude
3030
language: system
3131
"types_or": [python, pyi]
3232
require_serial: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ that folder, and the files within, is used for.
3939
To lint everything with `pre-commit` locally, run the command
4040

4141
```sh
42-
$ poetry run task lint
42+
$ uv run task lint
4343
```
4444

4545
Any trivial errors (formatting, minor linting problems) will automatically be fixed.

ansible/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Debian Stable is recommended, but any Linux distribution should work.
1212
From the project root directory:
1313

1414
1. Install the pre-commit hook: `pre-commit install`
15-
1. Install Poetry: `apt install python3-poetry`
16-
1. Install dependencies: `poetry install`
15+
1. Install UV: `curl -LsSf https://astral.sh/uv/install.sh | sh`
16+
1. Install dependencies: `uv sync`
1717
1. Head to the `ansible` directory: `cd ansible`
18-
1. Install Ansible dependencies: `poetry run ansible-galaxy install -r roles/requirements.yml`
18+
1. Install Ansible dependencies: `uv run ansible-galaxy install -r roles/requirements.yml`
1919
1. Create a `vault_passwords` file and write the vault password to it
2020
1. Configure the Ansible Vault git diff driver using `git config --global
2121
diff.ansible-vault.textconv "ansible-vault view"` and `git config diff.ansible-vault.cachetextconv false`

0 commit comments

Comments
 (0)