Skip to content

Commit 4ee5722

Browse files
authored
Alternative yamlfmt settings (#254)
1 parent 2e2d5d2 commit 4ee5722

File tree

3 files changed

+194
-193
lines changed

3 files changed

+194
-193
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
version: 2
33
updates:
4-
- package-ecosystem: pip
5-
directory: /
6-
schedule:
7-
interval: daily
8-
open-pull-requests-limit: 10
9-
target-branch: master
10-
- package-ecosystem: github-actions
11-
directory: /
12-
schedule:
13-
interval: daily
14-
open-pull-requests-limit: 10
4+
- package-ecosystem: pip
5+
directory: /
6+
schedule:
7+
interval: daily
8+
open-pull-requests-limit: 10
9+
target-branch: master
10+
- package-ecosystem: github-actions
11+
directory: /
12+
schedule:
13+
interval: daily
14+
open-pull-requests-limit: 10

.github/workflows/main.yml

Lines changed: 119 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -2,131 +2,131 @@
22
name: CI
33

44
on:
5-
push:
6-
branches: [master]
7-
tags: [v*]
8-
pull_request:
9-
branches: [master]
10-
workflow_dispatch:
5+
push:
6+
branches: [master]
7+
tags: [v*]
8+
pull_request:
9+
branches: [master]
10+
workflow_dispatch:
1111

1212
jobs:
13-
lint:
14-
name: Run linters
15-
runs-on: ubuntu-latest
16-
outputs:
17-
version: ${{ steps.version.outputs.version }}
18-
prerelease: ${{ steps.version.outputs.prerelease }}
19-
steps:
20-
- uses: actions/checkout@v2
21-
with:
22-
fetch-depth: 0
23-
- uses: actions/setup-python@v2
24-
with:
25-
python-version: '3.9'
26-
- name: Install GitHub matcher for ActionLint checker
27-
run: |
28-
echo "::add-matcher::.github/actionlint-matcher.json"
29-
- name: Install check-wheel-content, and twine
30-
run: python -m pip install build check-wheel-contents tox twine
31-
- name: Build package
32-
run: python -m build
33-
- name: Run tox for linter
34-
run: python -m tox -e lint
35-
- name: List result
36-
run: ls -l dist
37-
- name: Check wheel contents
38-
run: check-wheel-contents dist/*.whl
39-
- name: Check long_description
40-
run: python -m twine check dist/*
41-
- name: Get version info
42-
id: version
43-
run: tox -e version-info
44-
- name: Upload artifacts
45-
uses: actions/upload-artifact@v2
46-
with:
47-
name: dist
48-
path: dist
13+
lint:
14+
name: Run linters
15+
runs-on: ubuntu-latest
16+
outputs:
17+
version: ${{ steps.version.outputs.version }}
18+
prerelease: ${{ steps.version.outputs.prerelease }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
- uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.9'
26+
- name: Install GitHub matcher for ActionLint checker
27+
run: |
28+
echo "::add-matcher::.github/actionlint-matcher.json"
29+
- name: Install check-wheel-content, and twine
30+
run: python -m pip install build check-wheel-contents tox twine
31+
- name: Build package
32+
run: python -m build
33+
- name: Run tox for linter
34+
run: python -m tox -e lint
35+
- name: List result
36+
run: ls -l dist
37+
- name: Check wheel contents
38+
run: check-wheel-contents dist/*.whl
39+
- name: Check long_description
40+
run: python -m twine check dist/*
41+
- name: Get version info
42+
id: version
43+
run: tox -e version-info
44+
- name: Upload artifacts
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: dist
48+
path: dist
4949

50-
test:
51-
name: Python ${{ matrix.python-version }}
52-
runs-on: ubuntu-latest
53-
env:
54-
USING_COVERAGE: 3.7,3.8,3.9,3.10
50+
test:
51+
name: Python ${{ matrix.python-version }}
52+
runs-on: ubuntu-latest
53+
env:
54+
USING_COVERAGE: 3.7,3.8,3.9,3.10
5555

56-
strategy:
57-
matrix:
58-
python-version: ['3.7', '3.8', '3.9', '3.10']
56+
strategy:
57+
matrix:
58+
python-version: ['3.7', '3.8', '3.9', '3.10']
5959

60-
steps:
61-
- uses: actions/checkout@v2
62-
with:
63-
fetch-depth: 0
64-
- uses: actions/setup-python@v2
65-
with:
66-
python-version: ${{ matrix.python-version }}
67-
- name: Install dependencies
68-
run: |
69-
set -xe
70-
python -VV
71-
python -m site
72-
python -m pip install --upgrade pip
73-
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
74-
- name: Run tox targets for ${{ matrix.python-version }}
75-
run: python -m tox
60+
steps:
61+
- uses: actions/checkout@v2
62+
with:
63+
fetch-depth: 0
64+
- uses: actions/setup-python@v2
65+
with:
66+
python-version: ${{ matrix.python-version }}
67+
- name: Install dependencies
68+
run: |
69+
set -xe
70+
python -VV
71+
python -m site
72+
python -m pip install --upgrade pip
73+
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
74+
- name: Run tox targets for ${{ matrix.python-version }}
75+
run: python -m tox
7676

77-
- name: Prepare coverage artifact
78-
if: ${{ contains(env.USING_COVERAGE, matrix.python-version) }}
79-
uses: aio-libs/prepare-coverage@v21.9.1
77+
- name: Prepare coverage artifact
78+
if: ${{ contains(env.USING_COVERAGE, matrix.python-version) }}
79+
uses: aio-libs/prepare-coverage@v21.9.1
8080

81-
check:
82-
name: Check
83-
if: always()
84-
needs: [lint, test]
85-
runs-on: ubuntu-latest
86-
steps:
87-
- name: Decide whether the needed jobs succeeded or failed
88-
uses: re-actors/alls-green@release/v1
89-
with:
90-
jobs: ${{ toJSON(needs) }}
91-
- name: Upload coverage
92-
uses: aio-libs/upload-coverage@v21.9.4
81+
check:
82+
name: Check
83+
if: always()
84+
needs: [lint, test]
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Decide whether the needed jobs succeeded or failed
88+
uses: re-actors/alls-green@release/v1
89+
with:
90+
jobs: ${{ toJSON(needs) }}
91+
- name: Upload coverage
92+
uses: aio-libs/upload-coverage@v21.9.4
9393

94-
deploy:
95-
name: Deploy
96-
environment: release
94+
deploy:
95+
name: Deploy
96+
environment: release
9797
# Run only on pushing a tag
98-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
99-
needs: [lint, check]
100-
runs-on: ubuntu-latest
101-
steps:
102-
- name: Install pandoc
103-
run: |
104-
sudo apt-get install -y pandoc
105-
- name: Checkout
106-
uses: actions/checkout@v2.4.0
107-
with:
108-
fetch-depth: 0
109-
- name: Download distributions
110-
uses: actions/download-artifact@v2
111-
with:
112-
name: dist
113-
path: dist
114-
- name: Collected dists
115-
run: |
116-
tree dist
117-
- name: Convert README.rst to Markdown
118-
run: |
119-
pandoc -s -o README.md README.rst
120-
- name: PyPI upload
121-
uses: pypa/gh-action-pypi-publish@v1.4.2
122-
with:
123-
packages_dir: dist
124-
password: ${{ secrets.PYPI_API_TOKEN }}
125-
- name: GitHub Release
126-
uses: ncipollo/release-action@v1
127-
with:
128-
name: pytest-asyncio ${{ needs.lint.outputs.version }}
129-
artifacts: dist/*
130-
bodyFile: README.md
131-
prerelease: ${{ needs.lint.outputs.prerelease }}
132-
token: ${{ secrets.GITHUB_TOKEN }}
98+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
99+
needs: [lint, check]
100+
runs-on: ubuntu-latest
101+
steps:
102+
- name: Install pandoc
103+
run: |
104+
sudo apt-get install -y pandoc
105+
- name: Checkout
106+
uses: actions/checkout@v2.4.0
107+
with:
108+
fetch-depth: 0
109+
- name: Download distributions
110+
uses: actions/download-artifact@v2
111+
with:
112+
name: dist
113+
path: dist
114+
- name: Collected dists
115+
run: |
116+
tree dist
117+
- name: Convert README.rst to Markdown
118+
run: |
119+
pandoc -s -o README.md README.rst
120+
- name: PyPI upload
121+
uses: pypa/gh-action-pypi-publish@v1.4.2
122+
with:
123+
packages_dir: dist
124+
password: ${{ secrets.PYPI_API_TOKEN }}
125+
- name: GitHub Release
126+
uses: ncipollo/release-action@v1
127+
with:
128+
name: pytest-asyncio ${{ needs.lint.outputs.version }}
129+
artifacts: dist/*
130+
bodyFile: README.md
131+
prerelease: ${{ needs.lint.outputs.prerelease }}
132+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)