-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #615 from aiarena/lint-and-bot-file-api-update-rem…
…erge REMERGE - Linting, bot file api and python version update
- Loading branch information
Showing
201 changed files
with
6,639 additions
and
4,302 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.7 | ||
FROM python:3.10 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
|
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 |
---|---|---|
|
@@ -7,8 +7,23 @@ on: | |
branches: [ master, staging ] | ||
|
||
jobs: | ||
build: | ||
linters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python ./pip/pip-install.py --python=python --pip=pip | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
|
@@ -32,32 +47,32 @@ jobs: | |
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
python-version: [ '3.10' ] | ||
|
||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: shogo82148/actions-setup-redis@v1 | ||
with: | ||
redis-version: '6.x' | ||
- run: redis-cli ping | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python ./pip/pip-install.py --python=python --pip=pip | ||
- name: Grant aiarena user full access | ||
env: | ||
- name: Checkout repository and submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: shogo82148/actions-setup-redis@v1 | ||
with: | ||
redis-version: '6.x' | ||
- run: redis-cli ping | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python ./pip/pip-install.py --python=python --pip=pip | ||
- name: Grant aiarena user full access | ||
env: | ||
PORT: ${{ job.services.postgres.ports[5432] }} | ||
run: | | ||
PGPASSWORD="aiarena" psql -Uaiarena --host="127.0.0.1" --port "$PORT" -c "GRANT ALL PRIVILEGES ON DATABASE aiarena TO aiarena;"; | ||
- name: Run Tests | ||
env: | ||
run: | | ||
PGPASSWORD="aiarena" psql -Uaiarena --host="127.0.0.1" --port "$PORT" -c "GRANT ALL PRIVILEGES ON DATABASE aiarena TO aiarena;"; | ||
- name: Run Tests | ||
env: | ||
NOFAKE_REDIS: 1 | ||
run: | | ||
python manage.py test --noinput | ||
run: | | ||
python manage.py test --noinput |
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,13 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: Black | ||
entry: black --check | ||
types: [python] | ||
language: python | ||
- id: ruff | ||
name: ruff | ||
entry: ruff | ||
types: [python] | ||
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
class ApiConfig(AppConfig): | ||
name = 'aiarena.api' | ||
name = "aiarena.api" |
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
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
class ArenaClientConfig(AppConfig): | ||
name = 'aiarena.api.arenaclient' | ||
name = "aiarena.api.arenaclient" |
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
Oops, something went wrong.