-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
7,980 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
__pycache__/ | ||
*.py[cod] | ||
*.envx | ||
*.cover | ||
.coverage | ||
.coverage.* | ||
.cache | ||
*.log | ||
.git | ||
.mypy_cache | ||
.pytest_cache | ||
.idea | ||
.vscode | ||
.venv/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Init Postgres database | ||
POSTGRES_DB=arrakis | ||
POSTGRES_USER=arrakis | ||
POSTGRES_PASSWORD=testsonly | ||
|
||
# See Backend -> Configuration documentation | ||
ARRAKIS__DATABASE__URL=postgresql+asyncpg://arrakis:testsonly@db:5432/arrakis | ||
ARRAKIS__SERVER__LOGGING__PRESET=colored | ||
ARRAKIS__SERVER__DEBUG=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export ARRAKIS__DATABASE__URL=postgresql+asyncpg://arrakis:testsonly@127.0.0.1:5432/arrakis | ||
export ARRAKIS__SERVER__DEBUG=true | ||
export ARRAKIS__SERVER__LOGGING__PRESET=colored | ||
export ARRAKIS_TEST_SERVER_URL=http://localhost:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Thank you for your contribution! --> | ||
<!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR --> | ||
<!-- See https://github.com/MobileTeleSystems/arrakis/blob/develop/CONTRIBUTING.rst for help on Contributing --> | ||
<!-- PLEASE DO **NOT** put issue ids in the PR title! Instead, add a descriptive title and put ids in the body --> | ||
|
||
## Change Summary | ||
|
||
<!-- Please give a short summary of the changes. --> | ||
|
||
## Related issue number | ||
|
||
<!-- Are there any issues opened that will be resolved by merging this change? --> | ||
<!-- WARNING: please use "fix #123" style references so the issue is closed when this PR is merged. --> | ||
|
||
## Checklist | ||
|
||
* [ ] Commit message and PR title is comprehensive | ||
* [ ] Keep the change as small as possible | ||
* [ ] Unit and integration tests for the changes exist | ||
* [ ] Tests pass on CI and coverage does not decrease | ||
* [ ] Documentation reflects the changes where applicable | ||
* [ ] `docs/changelog/next_release/<pull request or issue id>.<change type>.rst` file added describing change | ||
(see [CONTRIBUTING.rst](https://github.com/MobileTeleSystems/arrakis/blob/develop/CONTRIBUTING.rst) for details.) | ||
* [ ] My PR is ready to review. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Set update schedule for GitHub Actions | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- type:ci | ||
# https://til.simonwillison.net/github/dependabot-python-setup | ||
groups: | ||
github-actions: | ||
patterns: | ||
- '*' | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- type:dependency | ||
# https://til.simonwillison.net/github/dependabot-python-setup | ||
groups: | ||
python-packages: | ||
patterns: | ||
- '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# config for https://github.com/marketplace/actions/github-labeler | ||
|
||
- name: attention:help wanted | ||
description: Extra attention is needed | ||
color: bfdadc | ||
from_name: help wanted | ||
|
||
- name: attention:invalid | ||
description: This doesn't seem right | ||
color: ea2357 | ||
from_name: invalid | ||
|
||
- name: ci:skip-changelog | ||
description: Add this label to skip changelog file check | ||
color: 04990f | ||
|
||
- name: component:backend | ||
description: Backend-related changes | ||
color: '5319e7' | ||
|
||
- name: component:client | ||
description: Client-related changes | ||
color: 75f526 | ||
|
||
- name: kind:bug | ||
description: Something isn't working | ||
color: d73a4a | ||
from_name: bug | ||
|
||
- name: kind:feature | ||
description: New feature or request | ||
color: 389a3f | ||
|
||
- name: kind:improvement | ||
description: Improvement of some existing feature | ||
color: 1a92c2 | ||
from_name: enhancement | ||
|
||
- name: kind:question | ||
description: Further information is requested | ||
color: 0e857c | ||
from_name: question | ||
|
||
- name: resolution:duplicate | ||
description: This issue or pull request already exists | ||
color: cfd3d7 | ||
from_name: duplicate | ||
|
||
- name: resolution:wontfix | ||
description: This will not be worked on | ||
color: ec103b | ||
from_name: wontfix | ||
|
||
- name: type:ci | ||
description: CI-related changes | ||
color: cdb0bd | ||
|
||
- name: type:dependency | ||
description: Dependency-related changes | ||
color: 214efe | ||
|
||
- name: type:documentation | ||
description: Improvements or additions to documentation | ||
color: 6b9f54 | ||
from_name: documentation | ||
|
||
- name: type:tests | ||
description: Tests-related changes | ||
color: 5cca5b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Automerge | ||
|
||
on: | ||
pull_request_target: | ||
|
||
jobs: | ||
automerge: | ||
name: Enable pull request automerge | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' | ||
|
||
steps: | ||
- uses: alexwilson/enable-github-automerge-action@2.0.0 | ||
with: | ||
github-token: ${{ secrets.AUTOMERGE_TOKEN }} | ||
merge-method: REBASE | ||
|
||
autoapprove: | ||
name: Automatically approve pull request | ||
needs: [automerge] | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'dependabot[bot]' | ||
|
||
steps: | ||
- uses: hmarr/auto-approve-action@v4 | ||
with: | ||
github-token: ${{ secrets.AUTOMERGE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Cleanup caches after merge | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# `actions:write` permission is required to delete caches | ||
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id | ||
actions: write | ||
contents: read | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cleanup cache | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO=${{ github.repository }} | ||
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH --limit 100 --sort size | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Code analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches-ignore: | ||
- master | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
# flake8-commas is failing on Python 3.12 | ||
DEFAULT_PYTHON: '3.11' | ||
|
||
jobs: | ||
linters: | ||
name: Linters | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
|
||
- name: Install poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Cache poetry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql-${{ hashFiles('**/poetry.lock') }} | ||
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-codeql- | ||
${{ runner.os }}-python- | ||
- name: Install dependencies | ||
run: | | ||
poetry install --no-root --all-extras --with dev --without docs,test | ||
- name: Run flake8 | ||
run: poetry run flake8 arrakis/ | ||
|
||
- name: Run mypy | ||
run: poetry run mypy ./arrakis --config-file ./pyproject.toml | ||
|
||
codeql: | ||
name: CodeQL | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: python | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: /language:python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Repo labels sync | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- .github/labels.yml | ||
- .github/workflows/repo-labels-sync.yml | ||
pull_request: | ||
paths: | ||
- .github/labels.yml | ||
- .github/workflows/repo-labels-sync.yml | ||
workflow_dispatch: | ||
|
||
jobs: | ||
labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Labeler | ||
uses: crazy-max/ghaction-github-labeler@v5 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
yaml-file: .github/labels.yml | ||
dry-run: ${{ github.event_name == 'pull_request' }} |
Oops, something went wrong.