Skip to content

Commit b53703a

Browse files
committed
chore: update CI workflows
1 parent 32ebebd commit b53703a

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
run:
3131
shell: bash
3232
steps:
33-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v3
3434

3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v2
36+
uses: actions/setup-python@v4
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939

4040
- name: Get full Python version
4141
id: full-python-version
42-
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
42+
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT
4343

4444
- name: Bootstrap poetry
4545
run: |
@@ -57,7 +57,7 @@ jobs:
5757
run: poetry config virtualenvs.in-project true
5858

5959
- name: Set up cache
60-
uses: actions/cache@v2
60+
uses: actions/cache@v3
6161
id: cache
6262
with:
6363
path: .venv
@@ -68,13 +68,10 @@ jobs:
6868
run: timeout 10s poetry run pip --version || rm -rf .venv
6969

7070
- name: Install dependencies
71-
run: poetry install
72-
73-
- name: Install pytest plugin
74-
run: poetry run pip install pytest-github-actions-annotate-failures
71+
run: poetry install --with github-actions
7572

7673
- name: Run mypy
7774
run: poetry run mypy
7875

7976
- name: Run pytest
80-
run: poetry run python -m pytest -p no:sugar -q tests/
77+
run: poetry run pytest -v

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515

16-
- name: Set up Python 3.9
17-
uses: actions/setup-python@v2
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v4
1818
with:
19-
python-version: "3.9"
19+
python-version: "3.10"
2020

2121
- name: Install Poetry
2222
run: |
23-
curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }}
23+
curl -sSL https://install.python-poetry.org | python - -y
2424
2525
- name: Update PATH
2626
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -32,7 +32,7 @@ jobs:
3232
id: check-version
3333
run: |
3434
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
35-
|| echo ::set-output name=prerelease::true
35+
|| echo prerelease=true >> $GITHUB_OUTPUT
3636
3737
- name: Create Release
3838
uses: ncipollo/release-action@v1

poetry.lock

Lines changed: 16 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ include = [
1818
python = "^3.7"
1919
poetry = "^1.4.0"
2020

21-
[tool.poetry.dev-dependencies]
21+
[tool.poetry.group.dev.dependencies]
2222
pre-commit = ">=2.6"
2323
pytest = ">=7.1.2"
2424
pytest-mock = ">=3.6.1"
2525
mypy = ">=1.1.1"
2626

27+
# only used in github actions
28+
[tool.poetry.group.github-actions]
29+
optional = true
30+
[tool.poetry.group.github-actions.dependencies]
31+
pytest-github-actions-annotate-failures = "^0.1.7"
32+
2733
[tool.poetry.plugins."poetry.application.plugin"]
2834
export = "poetry_plugin_bundle.plugin:BundleApplicationPlugin"
2935

@@ -58,6 +64,13 @@ module = [
5864
]
5965
ignore_missing_imports = true
6066

67+
68+
[tool.pytest.ini_options]
69+
testpaths = [
70+
"tests"
71+
]
72+
73+
6174
[build-system]
6275
requires = ["poetry-core"]
6376
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)