Skip to content

Commit 2d8df51

Browse files
authored
Merge pull request #55 from ppfeufer/allianceauth-v4
2 parents d550586 + d07474c commit 2d8df51

File tree

96 files changed

+2172
-674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2172
-674
lines changed

.eslintrc.json

-33
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ A clear and concise description of what the bug is.
1515

1616
Steps to reproduce the behavior:
1717
1. Go to '...'
18-
2. Click on '....'
19-
3. Scroll down to '....'
18+
2. Click on '...'
19+
3. Scroll down to '...'
2020
4. See error
2121

2222

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Fixes # (issue)
1515
## Checklist:
1616

1717
- [ ] My code follows the style guidelines of this project
18-
- [ ] I have performed a self-review of my own code
18+
- [ ] I have performed a self-review of my code
1919
- [ ] I have commented on my code, particularly in hard-to-understand areas
2020
- [ ] I have checked my code and corrected any misspellings

.github/dependabot.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,18 @@ updates:
66
directory: "/"
77
target-branch: "master"
88
schedule:
9-
interval: "daily"
9+
interval: "monthly"
10+
commit-message:
11+
# Prefix all commit messages with "[github-actions] "
12+
prefix: "[github-actions] "
13+
14+
# Maintain dependencies for npm
15+
- package-ecosystem: "npm"
16+
directory: "/"
17+
target-branch: "master"
18+
versioning-strategy: increase
19+
schedule:
20+
interval: "monthly"
21+
commit-message:
22+
# Prefix all commit messages with "[npm] "
23+
prefix: "[npm] "

.github/workflows/automated-checks.yml

+40-94
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,47 @@ on:
1616
- '**'
1717

1818
jobs:
19-
# pre-commit Checks
19+
# Run pre-commit Checks
2020
pre-commit:
2121
name: Pre Commit Checks
2222
runs-on: ubuntu-latest
2323

2424
steps:
25+
# Checkout the repository
2526
- name: Checkout
2627
uses: actions/checkout@v4
2728

29+
# Set up Python
2830
- name: Set up Python
2931
uses: actions/setup-python@v5
3032
with:
3133
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file
3234

35+
# Set up Node.js
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '20'
40+
- run: npm install
41+
3342
- name: Run Pre Commit Checks
3443
uses: pre-commit/[email protected]
3544

3645
# Run Test Coverage
37-
test-coverage-aa-stable:
46+
test-coverage:
3847
needs: [pre-commit]
39-
name: AA Latest (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} with ${{ matrix.database }})
48+
name: AA Latest (Python ${{ matrix.python-version }} with ${{ matrix.database }})
4049
runs-on: ubuntu-latest
4150

4251
strategy:
43-
# Set Python and Django version to test for the stable release of AllianceAuth
52+
# Set Python versions to test against
4453
matrix:
4554
python-version:
4655
- '3.8'
4756
- '3.9'
4857
- '3.10'
4958
- '3.11'
50-
django-version:
51-
- '4.0'
59+
- '3.12'
5260
# MySQL versions to test against
5361
database:
5462
# https://endoflife.date/mysql
@@ -58,13 +66,13 @@ jobs:
5866
- mariadb:10.4 # Maintained until: 18 June 2024
5967
- mariadb:10.5 # Maintained until: 24 June 2025
6068
- mariadb:10.6 # [LTS] Maintained until: July 2026
61-
- mariadb:10.10 # Maintained until: November 2023
6269
- mariadb:10.11 # [LTS] Maintained until: February 2028
6370
- mariadb:11.0 # Maintained until: June 2024
6471
- mariadb:11.1 # Maintained until: August 2024
6572

66-
# continue-on-error: ${{ matrix.python-version == '3.11-dev' }}
73+
# continue-on-error: ${{ matrix.python-version == '3.12' }}
6774

75+
# Set up services
6876
services:
6977
database:
7078
image: ${{ matrix.database }}
@@ -76,157 +84,95 @@ jobs:
7684
options: --tmpfs /var/lib/mysql
7785

7886
steps:
87+
# Checkout the repository
7988
- name: Checkout
8089
uses: actions/checkout@v4
8190

91+
# Install redis
8292
- name: Install redis
8393
run: sudo apt-get install -y redis-tools redis-server
8494

95+
# Verify that redis is up
8596
- name: Verify that redis is up
8697
run: redis-cli ping
8798

99+
# Set up Python
88100
- name: Setup Python ${{ matrix.python-version }}
89101
uses: actions/setup-python@v5
90102
with:
91103
python-version: ${{ matrix.python-version }}
92104

105+
# Install Tox and any other packages
93106
- name: Install Tox and any other packages
94107
run: |
95108
python -m pip install --upgrade pip
96109
python -m pip install --upgrade tox tox-gh-actions
97110
111+
# Run Tox with the specified environment
98112
- name: Run Tox
99113
env:
100-
TOX_ENV: allianceauth-stable
114+
TOX_ENV: allianceauth-latest
101115
DB_HOST: 127.0.0.1
102116
DB_USER: root
103117
DB_PASSWORD: temp_password_aa_tox_tests
104-
# Run tox using the version of Python in `PATH`
105118
run: tox -v -e ${{ env.TOX_ENV }}
106119

120+
# Upload coverage to Codecov
107121
- name: Upload Coverage
108122
if: ${{
109123
(
110-
github.event_name == 'pull_request' ||
111-
(
112-
github.event_name == 'push' &&
113-
github.ref == 'refs/heads/master'
124+
github.event_name == 'pull_request'
125+
|| (
126+
github.event_name == 'push'
127+
&& github.ref == 'refs/heads/master'
114128
)
115-
) &&
116-
(
117-
matrix.python-version == '3.10' &&
118-
matrix.database == 'mariadb:10.11' &&
119-
matrix.django-version == '4.0'
129+
)
130+
&& (
131+
matrix.python-version == '3.10'
132+
&& matrix.database == 'mariadb:10.11'
120133
)
121134
}}
122135
uses: codecov/codecov-action@v4
123136
with:
124-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
137+
token: ${{ secrets.CODECOV_TOKEN }}
125138
files: coverage.xml # optional
126139
# flags: unittests # optional
127140
# name: codecov-umbrella # optional
128141
# fail_ci_if_error: true # optional (default = false)
129142
verbose: true # optional (default = false)
130143

131-
# test-coverage-aa-dev:
132-
# needs: [ test-coverage-aa-stable ]
133-
# name: AA Dev (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} with ${{ matrix.database }})
134-
# runs-on: ubuntu-latest
135-
#
136-
# strategy:
137-
# # Set Python and Django version to test for the alpha/beta release of AllianceAuth
138-
# matrix:
139-
# # Python versions
140-
# python-version:
141-
# - '3.8'
142-
# - '3.9'
143-
# - '3.10'
144-
# - '3.11'
145-
# # Django versions
146-
# django-version:
147-
# - '4.0'
148-
# # MySQL versions to test against
149-
# database:
150-
# - mysql:5.7
151-
# - mysql:8.0
152-
# - mariadb:10.3
153-
# - mariadb:10.4
154-
# - mariadb:10.5
155-
# - mariadb:10.6
156-
# - mariadb:10.7
157-
# - mariadb:10.8
158-
# - mariadb:10.9
159-
#
160-
# continue-on-error: ${{ matrix.python-version == '3.11' }}
161-
#
162-
# services:
163-
# database:
164-
# image: ${{ matrix.database }}
165-
# env:
166-
# MYSQL_ROOT_PASSWORD: foobar
167-
# MYSQL_DATABASE: tox_allianceauth
168-
# ports:
169-
# - 3306:3306
170-
# options: --tmpfs /var/lib/mysql
171-
#
172-
# steps:
173-
# - name: Checkout
174-
# uses: actions/checkout@v4
175-
#
176-
# - name: Install redis
177-
# run: sudo apt-get install -y redis-tools redis-server
178-
#
179-
# - name: Verify that redis is up
180-
# run: redis-cli ping
181-
#
182-
# - name: Setup Python ${{ matrix.python-version }}
183-
# uses: actions/setup-python@v5
184-
# with:
185-
# python-version: ${{ matrix.python-version }}
186-
#
187-
# - name: Install Tox and any other packages
188-
# run: |
189-
# python -m pip install --upgrade pip
190-
# python -m pip install --upgrade tox tox-gh-actions
191-
#
192-
# - name: Run Tox
193-
# # Run tox using the version of Python in `PATH`
194-
# run: tox -v
195-
# env:
196-
# DJANGO: ${{ matrix.django-version }}
197-
# ALLIANCEAUTH: testing
198-
# DB_HOST: 127.0.0.1
199-
# DB_USER: root
200-
# DB_PASSWORD: temp_password_aa_tox_tests
201-
202-
# Pypi Build Test
144+
# Run PyPi Build Test
203145
pypi-build-test:
204-
needs: [ test-coverage-aa-stable ]
205-
# needs: [ test-coverage-aa-stable, test-coverage-aa-dev ]
146+
needs: [ test-coverage ]
206147
name: PyPi Build Test
207148
runs-on: ubuntu-latest
208149

209150
steps:
151+
# Checkout the repository
210152
- name: Checkout
211153
uses: actions/checkout@v4
212154

155+
# Set up Python
213156
- name: Set up Python
214157
uses: actions/setup-python@v5
215158
with:
216159
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file
217160

161+
# Install Tools
218162
- name: Install Tools
219163
run: |
220164
python -m pip install --upgrade pip
221165
python -m pip install --upgrade build
222166
python -m pip install --upgrade setuptools wheel
223167
168+
# Build Package
224169
- name: Package Build
225170
env:
226171
STACKMANAGER_VERSION: 9999
227172
run: |
228173
python -m build
229174
175+
# Upload Build Artifacts
230176
- name: Upload Build Artifacts
231177
uses: actions/upload-artifact@v4
232178
with:

.github/workflows/potential-duplicates.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Check potential duplicates when an issue is opened or edited.
2+
#
13
# https://github.com/wow-actions/potential-duplicates
24

35
name: Potential Duplicates
@@ -9,6 +11,7 @@ on:
911
jobs:
1012
run:
1113
runs-on: ubuntu-latest
14+
1215
steps:
1316
- uses: wow-actions/potential-duplicates@v1
1417
with:
@@ -25,7 +28,7 @@ jobs:
2528
state: all
2629
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
2730
threshold: 0.6
28-
# Reactions to be add to comment when potential duplicates are detected.
31+
# Reactions to be added to comment when potential duplicates are detected.
2932
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
3033
reactions: 'eyes, confused'
3134
# Comment to post when potential duplicates are detected.

.github/workflows/pypi-release.yml

+5
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,29 @@ on:
77

88
jobs:
99
release:
10+
# Release to PyPI
1011
name: Release on Pypi
1112
runs-on: ubuntu-latest
1213

1314
steps:
15+
# Checkout the repository
1416
- name: Checkout
1517
uses: actions/checkout@v4
1618

19+
# Set up Python
1720
- name: Set up Python
1821
uses: actions/setup-python@v5
1922
with:
2023
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file
2124

25+
# Install Tools
2226
- name: Install Tools
2327
run: |
2428
python -m pip install --upgrade pip
2529
python -m pip install --upgrade build
2630
python -m pip install --upgrade setuptools wheel twine
2731
32+
# Package and Upload
2833
- name: Package and Upload
2934
env:
3035
STACKMANAGER_VERSION: ${{ github.event.release.tag_name }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.idea/
55
.tox/
66
htmlcov/
7-
pastebin/
7+
node_modules/
88

99
*.log
1010
*.tmp
@@ -13,3 +13,4 @@ pastebin/
1313
__pycache__
1414
.coverage
1515
/coverage.xml
16+
alliance_auth.sqlite3

0 commit comments

Comments
 (0)