Skip to content

Commit be165b5

Browse files
committed
Prettier.
1 parent 099031f commit be165b5

File tree

2 files changed

+57
-53
lines changed

2 files changed

+57
-53
lines changed

.github/workflows/ci.yml

+52-52
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ on:
77
types: [published]
88
schedule:
99
# Daily at 3:21
10-
- cron: '21 3 * * *'
10+
- cron: "21 3 * * *"
1111

1212
jobs:
1313
pre-commit:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
18-
with:
19-
python-version: "3.10"
20-
- uses: pre-commit/[email protected]
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.10"
20+
- uses: pre-commit/[email protected]
2121

2222
ci:
2323
runs-on: ${{ matrix.os }}
@@ -74,55 +74,55 @@ jobs:
7474
toxenv: style
7575

7676
steps:
77-
- uses: actions/checkout@v3
78-
- name: Set up Python
79-
uses: actions/setup-python@v4
80-
with:
81-
python-version: ${{ matrix.python-version.name }}
82-
- name: Install dependencies
83-
run: >
84-
sudo apt-get update &&
85-
sudo apt-get install -y libenchant-dev libxml2-dev libxslt-dev
86-
if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-')
87-
- name: Install dependencies
88-
run: brew install enchant
89-
if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-')
90-
- name: Install tox
91-
run: python -m pip install tox
92-
- name: Run tox
93-
run: python -m tox -e "${{ matrix.python-version.toxenv }}"
77+
- uses: actions/checkout@v3
78+
- name: Set up Python
79+
uses: actions/setup-python@v4
80+
with:
81+
python-version: ${{ matrix.python-version.name }}
82+
- name: Install dependencies
83+
run: >
84+
sudo apt-get update &&
85+
sudo apt-get install -y libenchant-dev libxml2-dev libxslt-dev
86+
if: runner.os == 'Linux' && startsWith(matrix.python-version.toxenv, 'docs-')
87+
- name: Install dependencies
88+
run: brew install enchant
89+
if: runner.os == 'macOS' && startsWith(matrix.python-version.toxenv, 'docs-')
90+
- name: Install tox
91+
run: python -m pip install tox
92+
- name: Run tox
93+
run: python -m tox -e "${{ matrix.python-version.toxenv }}"
9494

9595
packaging:
9696
needs: ci
9797
runs-on: ubuntu-latest
9898

9999
steps:
100-
- uses: actions/checkout@v3
101-
- name: Set up Python
102-
uses: actions/setup-python@v4
103-
with:
104-
python-version: "3.10"
105-
- name: Install dependencies
106-
run: python -m pip install build
107-
- name: Create packages
108-
run: python -m build .
109-
- uses: actions/upload-artifact@v3
110-
with:
111-
name: dist
112-
path: dist
113-
- name: Publish package
114-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
115-
uses: pypa/gh-action-pypi-publish@release/v1
116-
with:
117-
user: __token__
118-
password: ${{ secrets.pypi_password }}
119-
- name: Create Release Notes
120-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
121-
uses: actions/github-script@v6
122-
with:
123-
github-token: ${{ secrets.GITHUB_TOKEN }}
124-
script: |
125-
await github.request(`POST /repos/${{ github.repository }}/releases`, {
126-
tag_name: "${{ github.ref }}",
127-
generate_release_notes: true
128-
});
100+
- uses: actions/checkout@v3
101+
- name: Set up Python
102+
uses: actions/setup-python@v4
103+
with:
104+
python-version: "3.10"
105+
- name: Install dependencies
106+
run: python -m pip install build
107+
- name: Create packages
108+
run: python -m build .
109+
- uses: actions/upload-artifact@v3
110+
with:
111+
name: dist
112+
path: dist
113+
- name: Publish package
114+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
115+
uses: pypa/gh-action-pypi-publish@release/v1
116+
with:
117+
user: __token__
118+
password: ${{ secrets.pypi_password }}
119+
- name: Create Release Notes
120+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
121+
uses: actions/github-script@v6
122+
with:
123+
github-token: ${{ secrets.GITHUB_TOKEN }}
124+
script: |
125+
await github.request(`POST /repos/${{ github.repository }}/releases`, {
126+
tag_name: "${{ github.ref }}",
127+
generate_release_notes: true
128+
});

.pre-commit-config.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ repos:
1616
- repo: https://github.com/PyCQA/isort
1717
rev: 5.10.1
1818
hooks:
19-
- id: isort
19+
- id: isort
20+
- repo: https://github.com/pre-commit/mirrors-prettier
21+
rev: "v2.7.1"
22+
hooks:
23+
- id: prettier

0 commit comments

Comments
 (0)