Skip to content

Commit 5f4e669

Browse files
committed
Merge branch 'develop'
2 parents 3527f11 + 92652a4 commit 5f4e669

22 files changed

+250
-318
lines changed

.coveragerc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.dockerignore

Lines changed: 0 additions & 158 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
name: CodeQL
1+
name: Code analysis
22

33
on:
44
push:
5-
branches-ignore:
6-
- dependabot/**
7-
- pre-commit-ci-update-config
8-
- master
9-
pull_request:
105
branches:
116
- develop
7+
pull_request:
8+
branches-ignore:
9+
- master
1210
workflow_dispatch:
1311

1412
concurrency:
1513
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1614
cancel-in-progress: true
1715

1816
jobs:
19-
analyze:
20-
name: Analyze
17+
linters:
18+
name: Linters
2119
runs-on: ubuntu-latest
2220
permissions:
2321
actions: read
@@ -50,27 +48,39 @@ jobs:
5048
- name: Install dependencies
5149
run: |
5250
pip install -I -r requirements-dev.txt
51+
5352
# Set the `CODEQL-PYTHON` environment variable to the Python executable
5453
# that includes the dependencies
5554
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
5655
5756
- name: Run flake8
58-
run: flake8 .
57+
run: python3 -m flake8 --config setup.cfg .
5958

6059
- name: Run mypy
6160
run: python3 -m mypy --config-file setup.cfg evacuator
6261

62+
codeql:
63+
name: CodeQL
64+
runs-on: ubuntu-latest
65+
permissions:
66+
actions: read
67+
contents: read
68+
security-events: write
69+
70+
steps:
71+
- name: Checkout repository
72+
uses: actions/checkout@v3
73+
74+
- name: Set up Python 3.11
75+
uses: actions/setup-python@v4
76+
with:
77+
python-version: '3.11'
78+
6379
# Initializes the CodeQL tools for scanning.
6480
- name: Initialize CodeQL
6581
uses: github/codeql-action/init@v2
6682
with:
6783
languages: python
68-
# If you wish to specify custom queries, you can do so here or in a config file.
69-
# By default, queries listed here will override any specified in a config file.
70-
# Prefix the list here with "+" to use these queries and those in the config file.
71-
72-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
73-
# queries: security-extended,security-and-quality
7484

7585
- name: Perform CodeQL Analysis
7686
uses: github/codeql-action/analyze@v2

.github/workflows/dev-release.yml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,53 @@ on:
88
- master
99
workflow_dispatch:
1010

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
13+
cancel-in-progress: true
14+
1115
jobs:
12-
wait-tests:
13-
name: Wait for tests
16+
wait-code-analysis:
17+
name: Release package
1418
runs-on: ubuntu-latest
19+
if: github.repository == 'MobileTeleSystems/evacuator' # prevent running on forks
1520

1621
steps:
1722
- uses: fountainhead/[email protected]
18-
id: wait-for-tests
23+
id: wait-for-linters
1924
with:
2025
token: ${{ secrets.GITHUB_TOKEN }}
21-
checkName: Tests done
26+
checkName: Linters
2227
ref: ${{ github.sha }}
2328
timeoutSeconds: 3600
2429

2530
- name: Fail the Build
2631
uses: cutenode/action-always-fail@v1
27-
if: steps.wait-for-tests.outputs.conclusion != 'success'
28-
29-
wait-codeql:
30-
name: Wait for CodeQL
31-
runs-on: ubuntu-latest
32+
if: steps.wait-for-linters.outputs.conclusion != 'success'
3233

33-
steps:
3434
- uses: fountainhead/[email protected]
3535
id: wait-for-codeql
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
38-
checkName: Analyze
38+
checkName: CodeQL
3939
ref: ${{ github.sha }}
4040
timeoutSeconds: 3600
4141

4242
- name: Fail the Build
4343
uses: cutenode/action-always-fail@v1
4444
if: steps.wait-for-codeql.outputs.conclusion != 'success'
4545

46-
release:
47-
name: Release package
48-
runs-on: ubuntu-latest
49-
needs: [wait-tests, wait-codeql]
46+
- uses: fountainhead/[email protected]
47+
id: wait-for-tests
48+
with:
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
checkName: Tests done
51+
ref: ${{ github.sha }}
52+
timeoutSeconds: 3600
53+
54+
- name: Fail the Build
55+
uses: cutenode/action-always-fail@v1
56+
if: steps.wait-for-tests.outputs.conclusion != 'success'
5057

51-
steps:
5258
- name: Checkout code
5359
uses: actions/checkout@v3
5460
with:
@@ -59,17 +65,6 @@ jobs:
5965
with:
6066
python-version: '3.11'
6167

62-
- name: Cache pip
63-
uses: actions/cache@v3
64-
with:
65-
path: ~/.cache/pip
66-
key: ${{ runner.os }}-python-3.11-release-${{ hashFiles('requirements*.txt') }}
67-
restore-keys: |
68-
${{ runner.os }}-python-3.11-release-${{ hashFiles('requirements*.txt') }}
69-
${{ runner.os }}-python-3.11-release-
70-
${{ runner.os }}-python
71-
${{ runner.os }}-
72-
7368
- name: Upgrade pip
7469
run: python -m pip install --upgrade pip setuptools wheel
7570

@@ -80,4 +75,4 @@ jobs:
8075
uses: pypa/gh-action-pypi-publish@release/v1
8176
with:
8277
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
83-
repository_url: https://test.pypi.org/legacy/
78+
repository-url: https://test.pypi.org/legacy/

.github/workflows/release.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*'
6+
- '[0-9]+.[0-9]+.[0-9]+'
77

88
jobs:
99
release:
1010
name: Release package
1111
runs-on: ubuntu-latest
12+
if: github.repository == 'MobileTeleSystems/evacuator' # prevent running on forks
1213

1314
steps:
1415
- name: Checkout code
@@ -21,17 +22,6 @@ jobs:
2122
with:
2223
python-version: '3.11'
2324

24-
- name: Cache pip
25-
uses: actions/cache@v3
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-python-3.11-release-${{ hashFiles('requirements*.txt') }}
29-
restore-keys: |
30-
${{ runner.os }}-python-3.11-release-${{ hashFiles('requirements*.txt') }}
31-
${{ runner.os }}-python-3.11-release-
32-
${{ runner.os }}-python
33-
${{ runner.os }}-
34-
3525
- name: Upgrade pip
3626
run: python -m pip install --upgrade pip setuptools wheel
3727

@@ -41,4 +31,4 @@ jobs:
4131
- name: Publish package
4232
uses: pypa/gh-action-pypi-publish@release/v1
4333
with:
44-
password: ${{ secrets.PYPI_TOKEN }}
34+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)