Skip to content

Commit 29e9789

Browse files
committed
Merge branch 'develop'
2 parents 5f4e669 + 04e551f commit 29e9789

39 files changed

+1073
-519
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Thank you for your contribution! -->
2+
<!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR -->
3+
<!-- See https://github.com/MobileTeleSystems/evacuator/blob/develop/CONTRIBUTING.rst for help on Contributing -->
4+
<!-- PLEASE DO **NOT** put issue ids in the PR title! Instead, add a descriptive title and put ids in the body -->
5+
6+
## Change Summary
7+
8+
<!-- Please give a short summary of the changes. -->
9+
10+
## Related issue number
11+
12+
<!-- Are there any issues opened that will be resolved by merging this change? -->
13+
<!-- WARNING: please use "fix #123" style references so the issue is closed when this PR is merged. -->
14+
15+
## Checklist
16+
17+
* [ ] Commit message and PR title is comprehensive
18+
* [ ] Keep the change as small as possible
19+
* [ ] Unit and integration tests for the changes exist
20+
* [ ] Tests pass on CI and coverage does not decrease
21+
* [ ] Documentation reflects the changes where applicable
22+
* [ ] `docs/changelog/next_release/<pull request or issue id>.<change type>.rst` file added describing change
23+
(see [CONTRIBUTING.rst](https://github.com/MobileTeleSystems/evacuator/blob/develop/CONTRIBUTING.rst) for details.)
24+
* [ ] My PR is ready to review.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: github-actions
6+
directory: /
7+
schedule:
8+
interval: weekly
9+
labels:
10+
- type:ci
11+
# https://til.simonwillison.net/github/dependabot-python-setup
12+
groups:
13+
github-actions:
14+
patterns:
15+
- '*'

.github/labels.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# config for https://github.com/marketplace/actions/github-labeler
2+
3+
- name: attention:help wanted
4+
description: Extra attention is needed
5+
color: bfdadc
6+
from_name: help wanted
7+
8+
- name: attention:invalid
9+
description: This doesn't seem right
10+
color: ea2357
11+
from_name: invalid
12+
13+
- name: ci:skip-changelog
14+
description: Add this label to skip changelog file check
15+
color: 04990f
16+
17+
- name: kind:bug
18+
description: Something isn't working
19+
color: d73a4a
20+
from_name: bug
21+
22+
- name: kind:feature
23+
description: New feature or request
24+
color: 389a3f
25+
26+
- name: kind:improvement
27+
description: Improvement of some existing feature
28+
color: 1a92c2
29+
from_name: enhancement
30+
31+
- name: kind:question
32+
description: Further information is requested
33+
color: 0e857c
34+
from_name: question
35+
36+
- name: resolution:duplicate
37+
description: This issue or pull request already exists
38+
color: cfd3d7
39+
from_name: duplicate
40+
41+
- name: resolution:wontfix
42+
description: This will not be worked on
43+
color: ec103b
44+
from_name: wontfix
45+
46+
- name: type:ci
47+
description: CI-related changes
48+
color: cdb0bd
49+
50+
- name: type:dependency
51+
description: Dependency-related changes
52+
color: 214efe
53+
54+
- name: type:documentation
55+
description: Improvements or additions to documentation
56+
color: 6b9f54
57+
from_name: documentation
58+
59+
- name: type:tests
60+
description: Tests-related changes
61+
color: 5cca5b

.github/workflows/automerge.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Automerge
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
automerge:
8+
name: Enable pull request automerge
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'
11+
12+
steps:
13+
- uses: alexwilson/[email protected]
14+
with:
15+
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
16+
merge-method: REBASE
17+
18+
autoapprove:
19+
name: Automatically approve pull request
20+
needs: [automerge]
21+
runs-on: ubuntu-latest
22+
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]'
23+
24+
steps:
25+
- uses: hmarr/auto-approve-action@v4
26+
with:
27+
github-token: ${{ secrets.AUTOMERGE_TOKEN }}

.github/workflows/changelog.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Changelog
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, labeled, unlabeled, reopened]
6+
branches-ignore:
7+
- master
8+
9+
env:
10+
DEFAULT_PYTHON: '3.12'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
check-changelog:
17+
name: Changelog Entry Check
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 10
20+
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-changelog') && github.event.pull_request.user.login != 'pre-commit-ci[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'"
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
28+
id: python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ env.DEFAULT_PYTHON }}
32+
33+
- name: Cache pip
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.cache/pip
37+
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }}
38+
restore-keys: |
39+
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-${{ hashFiles('requirements-docs.txt') }}
40+
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-changelog-
41+
42+
- name: Upgrade pip
43+
run: python -m pip install --upgrade pip setuptools wheel
44+
45+
- name: Install dependencies
46+
run: |
47+
pip install -I requirements-docs.txt
48+
49+
- name: Check changelog entry exists
50+
run: |
51+
if [ ! -s docs/changelog/next_release/${{ github.event.pull_request.number }}.*.rst ]; then
52+
echo "Please add corresponding file 'docs/changelog/next_release/<issue number>.<change type>.rst' with changes description"
53+
exit 1
54+
fi
55+
56+
- name: Validate changelog
57+
run: |
58+
# Fetch the pull request' base branch so towncrier will be able to
59+
# compare the current branch with the base branch.
60+
git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
61+
towncrier check --compare-with origin/${{ github.base_ref }}
62+
towncrier --draft

.github/workflows/codeql-analysis.yml

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@ name: Code analysis
33
on:
44
push:
55
branches:
6-
- develop
6+
- develop
77
pull_request:
88
branches-ignore:
9-
- master
9+
- master
1010
workflow_dispatch:
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1414
cancel-in-progress: true
1515

16+
env:
17+
# flake8-commas is failing on Python 3.12
18+
DEFAULT_PYTHON: '3.11'
19+
1620
jobs:
1721
linters:
1822
name: Linters
@@ -23,41 +27,41 @@ jobs:
2327
security-events: write
2428

2529
steps:
26-
- name: Checkout repository
27-
uses: actions/checkout@v3
28-
29-
- name: Set up Python 3.11
30-
uses: actions/setup-python@v4
31-
with:
32-
python-version: '3.11'
33-
34-
- name: Cache pip
35-
uses: actions/cache@v3
36-
with:
37-
path: ~/.cache/pip
38-
key: ${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }}
39-
restore-keys: |
40-
${{ runner.os }}-python-3.11-codeql-${{ hashFiles('requirements*.txt') }}
41-
${{ runner.os }}-python-3.11-codeql-
42-
${{ runner.os }}-python
43-
${{ runner.os }}-
44-
45-
- name: Upgrade pip
46-
run: python -m pip install --upgrade pip setuptools wheel
47-
48-
- name: Install dependencies
49-
run: |
50-
pip install -I -r requirements-dev.txt
51-
52-
# Set the `CODEQL-PYTHON` environment variable to the Python executable
53-
# that includes the dependencies
54-
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
55-
56-
- name: Run flake8
57-
run: python3 -m flake8 --config setup.cfg .
58-
59-
- name: Run mypy
60-
run: python3 -m mypy --config-file setup.cfg evacuator
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ env.DEFAULT_PYTHON }}
37+
38+
- name: Cache pip
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.cache/pip
42+
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }}
43+
restore-keys: |
44+
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('requirements*.txt') }}
45+
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-
46+
${{ runner.os }}-python
47+
${{ runner.os }}-
48+
49+
- name: Upgrade pip
50+
run: python -m pip install --upgrade pip setuptools wheel
51+
52+
- name: Install dependencies
53+
run: |
54+
pip install -I -r requirements-dev.txt
55+
56+
# Set the `CODEQL-PYTHON` environment variable to the Python executable
57+
# that includes the dependencies
58+
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
59+
60+
- name: Run flake8
61+
run: python3 -m flake8 --config setup.cfg .
62+
63+
- name: Run mypy
64+
run: python3 -m mypy --config-file setup.cfg evacuator
6165

6266
codeql:
6367
name: CodeQL
@@ -68,21 +72,21 @@ jobs:
6872
security-events: write
6973

7074
steps:
71-
- name: Checkout repository
72-
uses: actions/checkout@v3
75+
- name: Checkout repository
76+
uses: actions/checkout@v4
7377

74-
- name: Set up Python 3.11
75-
uses: actions/setup-python@v4
76-
with:
77-
python-version: '3.11'
78+
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
79+
uses: actions/setup-python@v5
80+
with:
81+
python-version: ${{ env.DEFAULT_PYTHON }}
7882

7983
# Initializes the CodeQL tools for scanning.
80-
- name: Initialize CodeQL
81-
uses: github/codeql-action/init@v2
82-
with:
83-
languages: python
84-
85-
- name: Perform CodeQL Analysis
86-
uses: github/codeql-action/analyze@v2
87-
with:
88-
category: /language:python
84+
- name: Initialize CodeQL
85+
uses: github/codeql-action/init@v3
86+
with:
87+
languages: python
88+
89+
- name: Perform CodeQL Analysis
90+
uses: github/codeql-action/analyze@v3
91+
with:
92+
category: /language:python

0 commit comments

Comments
 (0)