Skip to content

Commit 643d538

Browse files
committed
Bump dependencies and speedup tests
1 parent 0cba743 commit 643d538

25 files changed

+295
-254
lines changed

.github/dependabot.yml

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,69 @@
1+
# Reconsider Dependabot if they ever add grouped updates: https://github.com/dependabot/dependabot-core/issues/1190
2+
3+
# To get started with Dependabot version updates, you'll need to specify which
4+
# package ecosystems to update and where the package manifests are located.
5+
# Please see the documentation for all configuration options:
6+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
7+
18
version: 2
29
updates:
310
- package-ecosystem: "npm"
4-
directory: "/**"
5-
allow:
6-
- dependency-type: "production"
11+
directory: "/tournament-scheduler"
12+
target-branch: "develop"
13+
schedule:
14+
interval: "weekly"
15+
labels:
16+
- "dependencies"
17+
- "tournament-scheduler"
18+
assignees:
19+
- "Avasam"
20+
reviewers:
21+
- "Avasam"
22+
ignore:
23+
- dependency-name: "*"
24+
# Temporarily adding version-update:semver-minor to the ignore as dependabot
25+
# still wants to increase the minor version in the lockfile only despite
26+
# versioning-strategy: increase-if-necessary. This is a know issue:
27+
# https://github.com/dependabot/dependabot-core/issues/3891
28+
update-types:
29+
["version-update:semver-patch", "version-update:semver-minor"]
30+
versioning-strategy: increase-if-necessary
31+
32+
- package-ecosystem: "npm"
33+
directory: "/global-scoreboard"
34+
target-branch: "develop"
35+
schedule:
36+
interval: "weekly"
37+
labels:
38+
- "dependencies"
39+
assignees:
40+
- "Avasam"
41+
reviewers:
42+
- "Avasam"
43+
ignore:
44+
- dependency-name: "*"
45+
# Temporarily adding version-update:semver-minor to the ignore as dependabot
46+
# still wants to increase the minor version in the lockfile only despite
47+
# versioning-strategy: increase-if-necessary. This is a know issue:
48+
# https://github.com/dependabot/dependabot-core/issues/3891
49+
update-types:
50+
["version-update:semver-patch", "version-update:semver-minor"]
51+
versioning-strategy: increase-if-necessary
52+
53+
- package-ecosystem: "pip"
54+
directory: "/scripts"
55+
target-branch: "develop"
56+
schedule:
57+
interval: "weekly"
58+
labels:
59+
- "dependencies"
60+
assignees:
61+
- "Avasam"
62+
reviewers:
63+
- "Avasam"
64+
65+
# Check for updates to GitHub Actions
66+
- package-ecosystem: "github-actions"
67+
directory: "/"
68+
schedule:
69+
interval: "weekly"

.github/disabled-dependabot.yml

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

.github/workflows/codeql-analysis.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main, develop ]
16+
branches: [main, develop]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ develop ]
19+
branches: [develop]
2020
schedule:
21-
- cron: '26 13 * * 6'
21+
- cron: "26 13 * * 6"
2222

2323
jobs:
2424
analyze:
@@ -28,40 +28,40 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
language: [ 'javascript', 'python' ]
31+
language: ["javascript", "python"]
3232
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3333
# Learn more:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3535

3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v3
37+
- name: Checkout repository
38+
uses: actions/checkout@v3
3939

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v2
43-
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v2
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4949

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v2
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v2
5454

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
5757

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
6161

62-
#- run: |
63-
# make bootstrap
64-
# make release
62+
#- run: |
63+
# make bootstrap
64+
# make release
6565

66-
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v2
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

.github/workflows/lint-and-build-global-scoreboard.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78
paths:
8-
- 'global-scoreboard/**'
9+
- "global-scoreboard/**"
10+
- ".github/workflows/lint-and-build-global-scoreboard.yml"
911
pull_request:
1012
branches:
1113
- main
1214
- develop
1315
paths:
14-
- 'global-scoreboard/**'
16+
- "global-scoreboard/**"
17+
- ".github/workflows/lint-and-build-global-scoreboard.yml"
1518
jobs:
1619
ESLint:
1720
runs-on: ubuntu-latest

.github/workflows/lint-and-build-tournament-scheduler.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78
paths:
8-
- 'tournament-scheduler/**'
9+
- "tournament-scheduler/**"
10+
- ".github/workflows/lint-and-build-tournament-scheduler.yml"
911
pull_request:
1012
branches:
1113
- main
1214
- develop
1315
paths:
14-
- 'tournament-scheduler/**'
16+
- "tournament-scheduler/**"
17+
- ".github/workflows/lint-and-build-tournament-scheduler.yml"
1518
jobs:
1619
ESLint:
1720
runs-on: ubuntu-latest

.github/workflows/lint-python.yml

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,32 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78
paths:
89
- "**.py"
910
- "**.pyi"
11+
- ".github/workflows/lint-python.yml"
12+
- "scripts/requirements*.txt"
1013
pull_request:
1114
branches:
1215
- main
1316
- develop
1417
paths:
1518
- "**.py"
1619
- "**.pyi"
20+
- ".github/workflows/lint-python.yml"
21+
- "scripts/requirements*.txt"
1722

1823
env:
24+
# https://help.pythonanywhere.com/pages/ChangingSystemImage/#available-python-versions-for-system-images
1925
python-version: "3.10"
26+
# https://help.pythonanywhere.com/pages/ChangingSystemImage/#base-ubuntu-version-for-each-system-image
27+
# runs-on: "ubuntu-20.04"
2028

2129
jobs:
30+
# Jobs that don't need dependencies installed
2231
isort:
23-
runs-on: ubuntu-latest
32+
runs-on: "ubuntu-20.04"
2433
steps:
2534
- name: Checkout ${{ github.repository }}/${{ github.ref }}
2635
uses: actions/checkout@v3
@@ -29,15 +38,11 @@ jobs:
2938
with:
3039
python-version: ${{ env.python-version }}
3140
cache: "pip"
32-
cache-dependency-path: "scripts/requirements*.txt"
33-
- name: Install dependencies
34-
run: |
35-
pip install wheel
36-
pip install -r "scripts/requirements.txt"
37-
- name: Analysing the code with ${{ job.name }}
38-
run: isort backend/ typings/ --check-only
41+
cache-dependency-path: "scripts/requirements-dev.txt"
42+
- run: pip install isort
43+
- run: isort backend/ typings/ --check-only
3944
add-trailing-comma:
40-
runs-on: ubuntu-latest
45+
runs-on: "ubuntu-20.04"
4146
steps:
4247
- name: Checkout ${{ github.repository }}/${{ github.ref }}
4348
uses: actions/checkout@v3
@@ -46,12 +51,11 @@ jobs:
4651
with:
4752
python-version: ${{ env.python-version }}
4853
cache: "pip"
49-
cache-dependency-path: "scripts/requirements*.txt"
54+
cache-dependency-path: "scripts/requirements-dev.txt"
5055
- run: pip install add-trailing-comma
51-
- name: Analysing the code with ${{ job.name }}
52-
run: add-trailing-comma $(git ls-files '**.py*') --py36-plus
56+
- run: add-trailing-comma $(git ls-files '**.py*') --py36-plus
5357
Bandit:
54-
runs-on: ubuntu-latest
58+
runs-on: "ubuntu-20.04"
5559
steps:
5660
- name: Checkout ${{ github.repository }}/${{ github.ref }}
5761
uses: actions/checkout@v3
@@ -60,13 +64,13 @@ jobs:
6064
with:
6165
python-version: ${{ env.python-version }}
6266
cache: "pip"
63-
cache-dependency-path: "scripts/requirements*.txt"
67+
cache-dependency-path: "scripts/requirements-dev.txt"
6468
- run: pip install bandit
65-
- run: mv backend/configs.template.py backend/configs.py
66-
- name: Analysing the code with ${{ job.name }}
67-
run: bandit -n 1 --severity-level medium --recursive backend
69+
- run: bandit -n 1 --severity-level medium --recursive backend
70+
71+
# Jobs that do need dependencies installed
6872
Pyright:
69-
runs-on: ubuntu-latest
73+
runs-on: "ubuntu-20.04"
7074
steps:
7175
- name: Checkout ${{ github.repository }}/${{ github.ref }}
7276
uses: actions/checkout@v3
@@ -79,15 +83,14 @@ jobs:
7983
- name: Install dependencies
8084
run: |
8185
pip install wheel
82-
pip install -r "scripts/requirements.txt"
86+
pip install -r "scripts/requirements-dev.txt"
8387
- run: mv backend/configs.template.py backend/configs.py
84-
- name: Analysing the code with ${{ job.name }}
85-
uses: jakebailey/pyright-action@v1
88+
- uses: jakebailey/pyright-action@v1
8689
with:
8790
working-directory: backend/
8891
extra-args: --warnings
8992
Pylint:
90-
runs-on: ubuntu-latest
93+
runs-on: "ubuntu-20.04"
9194
steps:
9295
- name: Checkout ${{ github.repository }}/${{ github.ref }}
9396
uses: actions/checkout@v3
@@ -100,12 +103,11 @@ jobs:
100103
- name: Install dependencies
101104
run: |
102105
pip install wheel
103-
pip install -r "scripts/requirements.txt"
106+
pip install -r "scripts/requirements-dev.txt"
104107
- run: mv backend/configs.template.py backend/configs.py
105-
- name: Analysing the code with ${{ job.name }}
106-
run: pylint backend/ --reports=y --output-format=colorized
108+
- run: pylint backend/ --reports=y --output-format=colorized
107109
Flake8:
108-
runs-on: ubuntu-latest
110+
runs-on: "ubuntu-20.04"
109111
steps:
110112
- name: Checkout ${{ github.repository }}/${{ github.ref }}
111113
uses: actions/checkout@v3
@@ -114,11 +116,6 @@ jobs:
114116
with:
115117
python-version: ${{ env.python-version }}
116118
cache: "pip"
117-
cache-dependency-path: "scripts/requirements*.txt"
118-
- name: Install dependencies
119-
run: |
120-
pip install wheel
121-
pip install -r "scripts/requirements.txt"
122-
- run: mv backend/configs.template.py backend/configs.py
123-
- name: Analysing the code with ${{ job.name }}
124-
run: flake8 backend/ typings/
119+
cache-dependency-path: "scripts/requirements-dev.txt"
120+
- run: pip install -r "scripts/requirements-dev.txt"
121+
- run: flake8 backend/ typings/

0 commit comments

Comments
 (0)