Skip to content

Commit

Permalink
Merge pull request #158 from ppfeufer/allianceauth-v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeufer authored Mar 15, 2024
2 parents ecd3a0c + bd6bdf5 commit 5e9e883
Show file tree
Hide file tree
Showing 127 changed files with 9,680 additions and 8,307 deletions.
33 changes: 0 additions & 33 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ A clear and concise description of what the bug is.

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
2. Click on '...'
3. Scroll down to '...'
4. See error


Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Fixes # (issue)
## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have checked my code and corrected any misspellings
22 changes: 21 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,24 @@ updates:
directory: "/"
target-branch: "master"
schedule:
interval: "daily"
interval: "monthly"
commit-message:
# Prefix all commit messages with "[github-actions] "
prefix: "[github-actions] "
labels:
- "github-actions"
- "dependencies"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
target-branch: "master"
versioning-strategy: increase
schedule:
interval: "monthly"
commit-message:
# Prefix all commit messages with "[npm] "
prefix: "[npm] "
labels:
- "npm"
- "dependencies"
134 changes: 40 additions & 94 deletions .github/workflows/automated-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,47 @@ on:
- '**'

jobs:
# pre-commit Checks
# Run pre-commit Checks
pre-commit:
name: Pre Commit Checks
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file

# Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install

- name: Run Pre Commit Checks
uses: pre-commit/action@v3.0.1

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

strategy:
# Set Python and Django version to test for the stable release of AllianceAuth
# Set Python versions to test against
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
django-version:
- '4.0'
- '3.12'
# MySQL versions to test against
database:
# https://endoflife.date/mysql
Expand All @@ -58,13 +66,13 @@ jobs:
- mariadb:10.4 # Maintained until: 18 June 2024
- mariadb:10.5 # Maintained until: 24 June 2025
- mariadb:10.6 # [LTS] Maintained until: July 2026
- mariadb:10.10 # Maintained until: November 2023
- mariadb:10.11 # [LTS] Maintained until: February 2028
- mariadb:11.0 # Maintained until: June 2024
- mariadb:11.1 # Maintained until: August 2024

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

# Set up services
services:
database:
image: ${{ matrix.database }}
Expand All @@ -76,157 +84,95 @@ jobs:
options: --tmpfs /var/lib/mysql

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4

# Install redis
- name: Install redis
run: sudo apt-get install -y redis-tools redis-server

# Verify that redis is up
- name: Verify that redis is up
run: redis-cli ping

# Set up Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Install Tox and any other packages
- name: Install Tox and any other packages
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
# Run Tox with the specified environment
- name: Run Tox
env:
TOX_ENV: allianceauth-stable
TOX_ENV: allianceauth-latest
DB_HOST: 127.0.0.1
DB_USER: root
DB_PASSWORD: temp_password_aa_tox_tests
# Run tox using the version of Python in `PATH`
run: tox -v -e ${{ env.TOX_ENV }}

# Upload coverage to Codecov
- name: Upload Coverage
if: ${{
(
github.event_name == 'pull_request' ||
(
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
github.event_name == 'pull_request'
|| (
github.event_name == 'push'
&& github.ref == 'refs/heads/master'
)
) &&
(
matrix.python-version == '3.10' &&
matrix.database == 'mariadb:10.11' &&
matrix.django-version == '4.0'
)
&& (
matrix.python-version == '3.10'
&& matrix.database == 'mariadb:10.11'
)
}}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
# fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

# test-coverage-aa-dev:
# needs: [ test-coverage-aa-stable ]
# name: AA Dev (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} with ${{ matrix.database }})
# runs-on: ubuntu-latest
#
# strategy:
# # Set Python and Django version to test for the alpha/beta release of AllianceAuth
# matrix:
# # Python versions
# python-version:
# - '3.8'
# - '3.9'
# - '3.10'
# - '3.11'
# # Django versions
# django-version:
# - '4.0'
# # MySQL versions to test against
# database:
# - mysql:5.7
# - mysql:8.0
# - mariadb:10.3
# - mariadb:10.4
# - mariadb:10.5
# - mariadb:10.6
# - mariadb:10.7
# - mariadb:10.8
# - mariadb:10.9
#
# continue-on-error: ${{ matrix.python-version == '3.11' }}
#
# services:
# database:
# image: ${{ matrix.database }}
# env:
# MYSQL_ROOT_PASSWORD: foobar
# MYSQL_DATABASE: tox_allianceauth
# ports:
# - 3306:3306
# options: --tmpfs /var/lib/mysql
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Install redis
# run: sudo apt-get install -y redis-tools redis-server
#
# - name: Verify that redis is up
# run: redis-cli ping
#
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Install Tox and any other packages
# run: |
# python -m pip install --upgrade pip
# python -m pip install --upgrade tox tox-gh-actions
#
# - name: Run Tox
# # Run tox using the version of Python in `PATH`
# run: tox -v
# env:
# DJANGO: ${{ matrix.django-version }}
# ALLIANCEAUTH: testing
# DB_HOST: 127.0.0.1
# DB_USER: root
# DB_PASSWORD: temp_password_aa_tox_tests

# Pypi Build Test
# Run PyPi Build Test
pypi-build-test:
needs: [ test-coverage-aa-stable ]
# needs: [ test-coverage-aa-stable, test-coverage-aa-dev ]
needs: [ test-coverage ]
name: PyPi Build Test
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file

# Install Tools
- name: Install Tools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade setuptools wheel
# Build Package
- name: Package Build
env:
STACKMANAGER_VERSION: 9999
run: |
python -m build
# Upload Build Artifacts
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/potential-duplicates.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Check potential duplicates when an issue is opened or edited.
#
# https://github.com/wow-actions/potential-duplicates

name: Potential Duplicates
Expand All @@ -9,6 +11,7 @@ on:
jobs:
run:
runs-on: ubuntu-latest

steps:
- uses: wow-actions/potential-duplicates@v1
with:
Expand All @@ -25,7 +28,7 @@ jobs:
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.6
# Reactions to be add to comment when potential duplicates are detected.
# Reactions to be added to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
reactions: 'eyes, confused'
# Comment to post when potential duplicates are detected.
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ on:

jobs:
release:
# Release to PyPI
name: Release on Pypi
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v4

# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file

# Install Tools
- name: Install Tools
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade setuptools wheel twine
# Package and Upload
- name: Package and Upload
env:
STACKMANAGER_VERSION: ${{ github.event.release.tag_name }}
Expand Down
Loading

0 comments on commit 5e9e883

Please sign in to comment.