Skip to content

Commit b1f79c7

Browse files
committed
Run yamlfmt on all files
`pre-commit run --all-files`
1 parent b67d65a commit b1f79c7

File tree

3 files changed

+73
-92
lines changed

3 files changed

+73
-92
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Main testing workflow
2-
32
on:
43
push:
54
pull_request:
65
workflow_dispatch:
7-
86
jobs:
97
build:
108
name: Build package
@@ -17,9 +15,7 @@ jobs:
1715
cache: "pip"
1816
- name: Install pypa/build
1917
run: >-
20-
python3 -m pip install --user
21-
build
22-
twine
18+
python3 -m pip install --user build twine
2319
- name: Build a binary wheel and a source tarball
2420
run: python3 -m build
2521
- name: Check the distribution files with `twine`
@@ -58,76 +54,65 @@ jobs:
5854
toxfactor: py3.13
5955
ignore-typecheck-outcome: true
6056
ignore-test-outcome: false
61-
6257
steps:
63-
- uses: actions/checkout@v4
64-
65-
- name: Set up Python ${{ matrix.python-version }}
66-
uses: actions/setup-python@v4
67-
id: setup-python
68-
with:
69-
python-version: ${{ matrix.python-version }}
70-
71-
- name: Install poetry
72-
run: |
73-
python -m pip install poetry==2.0.0
74-
75-
- name: Configure poetry
76-
run: |
77-
python -m poetry config virtualenvs.in-project true
78-
79-
- name: Cache the virtualenv
80-
id: poetry-dependencies-cache
81-
uses: actions/cache@v3
82-
with:
83-
path: ./.venv
84-
key: ${{ runner.os }}-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
85-
86-
- name: Install dev dependencies
87-
if: steps.poetry-dependencies-cache.outputs.cache-hit != 'true'
88-
run: |
89-
python -m poetry install --only=dev
90-
91-
- name: Download artifact
92-
uses: actions/download-artifact@v4
93-
with:
94-
name: dist-files
95-
path: dist/
96-
97-
- name: Type checking
98-
# Ignore errors for older pythons
99-
continue-on-error: ${{ matrix.ignore-typecheck-outcome }}
100-
run: |
101-
source .venv/bin/activate
102-
tox -e mypy
103-
104-
- name: Test with tox
105-
continue-on-error: ${{ matrix.ignore-test-outcome }}
106-
run: |
107-
source .venv/bin/activate
108-
coverage erase
109-
# Using `--parallel 4` as it's the number of CPUs in the GitHub Actions runner
110-
# Using `installpkg dist/*.whl` because we want to install the pre-built package (want to test against that)
111-
tox run-parallel -f ${{ matrix.toxfactor }} --parallel 4 --parallel-no-spinner --parallel-live --installpkg dist/*.whl
112-
coverage combine
113-
coverage xml
114-
115-
- uses: codecov/codecov-action@v4
116-
with:
58+
- uses: actions/checkout@v4
59+
- name: Set up Python ${{ matrix.python-version }}
60+
uses: actions/setup-python@v4
61+
id: setup-python
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
- name: Install poetry
65+
run: |
66+
python -m pip install poetry==2.0.0
67+
- name: Configure poetry
68+
run: |
69+
python -m poetry config virtualenvs.in-project true
70+
- name: Cache the virtualenv
71+
id: poetry-dependencies-cache
72+
uses: actions/cache@v3
73+
with:
74+
path: ./.venv
75+
key: ${{ runner.os }}-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
76+
- name: Install dev dependencies
77+
if: steps.poetry-dependencies-cache.outputs.cache-hit != 'true'
78+
run: |
79+
python -m poetry install --only=dev
80+
- name: Download artifact
81+
uses: actions/download-artifact@v4
82+
with:
83+
name: dist-files
84+
path: dist/
85+
- name: Type checking
86+
# Ignore errors for older pythons
87+
continue-on-error: ${{ matrix.ignore-typecheck-outcome }}
88+
run: |
89+
source .venv/bin/activate
90+
tox -e mypy
91+
- name: Test with tox
92+
continue-on-error: ${{ matrix.ignore-test-outcome }}
93+
run: |
94+
source .venv/bin/activate
95+
coverage erase
96+
# Using `--parallel 4` as it's the number of CPUs in the GitHub Actions runner
97+
# Using `installpkg dist/*.whl` because we want to install the pre-built package (want to test against that)
98+
tox run-parallel -f ${{ matrix.toxfactor }} --parallel 4 --parallel-no-spinner --parallel-live --installpkg dist/*.whl
99+
coverage combine
100+
coverage xml
101+
- uses: codecov/codecov-action@v4
102+
with:
117103
# Explicitly using the token to avoid Codecov rate limit errors
118-
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
119-
token: ${{ secrets.CODECOV_TOKEN }}
120-
fail_ci_if_error: false
121-
verbose: true # optional (default = false)
122-
104+
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
105+
token: ${{ secrets.CODECOV_TOKEN }}
106+
fail_ci_if_error: false
107+
verbose: true # optional (default = false)
123108
pypi-publish:
124109
name: Upload release to PyPI
125110
runs-on: ubuntu-latest
126111
environment:
127112
name: pypi
128113
url: https://pypi.org/p/pytest-factoryboy
129114
permissions:
130-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
115+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
131116
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
132117
needs:
133118
- "test-run"

.pre-commit-config.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: https://github.com/psf/black
5-
rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # frozen: 25.1.0
4+
- repo: https://github.com/psf/black
5+
rev: 8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # frozen: 25.1.0
66
hooks:
7-
- id: black
8-
- repo: https://github.com/pycqa/isort
9-
rev: c8ab4a5b21bac924d106e3103dd7c979fdd0f9bc # frozen: 6.0.1
7+
- id: black
8+
- repo: https://github.com/pycqa/isort
9+
rev: c8ab4a5b21bac924d106e3103dd7c979fdd0f9bc # frozen: 6.0.1
1010
hooks:
11-
- id: isort
12-
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
11+
- id: isort
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
1414
hooks:
15-
- id: trailing-whitespace
16-
- id: end-of-file-fixer
17-
- id: check-yaml
18-
- id: check-added-large-files
19-
- repo: https://github.com/google/yamlfmt
20-
rev: a69a26f0e2a6d5768f3496239ba1e41c6bb74b6e # frozen: v0.17.2
15+
- id: trailing-whitespace
16+
- id: end-of-file-fixer
17+
- id: check-yaml
18+
- id: check-added-large-files
19+
- repo: https://github.com/google/yamlfmt
20+
rev: a69a26f0e2a6d5768f3496239ba1e41c6bb74b6e # frozen: v0.17.2
2121
hooks:
22-
- id: yamlfmt
23-
- repo: https://github.com/asottile/pyupgrade
24-
rev: 37bfa06d791fd38fb4e54910b36a2ff57641b074 # frozen: v3.20.0
22+
- id: yamlfmt
23+
- repo: https://github.com/asottile/pyupgrade
24+
rev: 37bfa06d791fd38fb4e54910b36a2ff57641b074 # frozen: v3.20.0
2525
hooks:
26-
- id: pyupgrade
26+
- id: pyupgrade
2727
args: [--py39-plus]
28-
- repo: https://github.com/python-poetry/poetry
29-
rev: "84eeadc21f92a04d46ea769e3e39d7c902e44136" # frozen: 2.1.3
28+
- repo: https://github.com/python-poetry/poetry
29+
rev: "84eeadc21f92a04d46ea769e3e39d7c902e44136" # frozen: 2.1.3
3030
hooks:
31-
- id: poetry-check
31+
- id: poetry-check
3232
args: ["--lock"]

.readthedocs.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
# .readthedocs.yaml
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4-
54
version: 2
6-
75
build:
86
os: ubuntu-22.04
97
tools:
108
python: "3"
11-
129
sphinx:
13-
configuration: docs/conf.py
10+
configuration: docs/conf.py
1411
formats:
1512
- epub
1613
- pdf
1714
- htmlzip
18-
1915
python:
2016
install:
2117
- method: pip

0 commit comments

Comments
 (0)