Skip to content

[RELEASE] v2.0.6

[RELEASE] v2.0.6 #562

Workflow file for this run

name: Checks
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
branches:
- '**'
jobs:
# Run pre-commit Checks
pre-commit:
name: Pre Commit Checks
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v6
# Set up Python
- name: Set up Python
uses: actions/setup-python@v6
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@v6
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- run: npm install
- name: Run Pre Commit Checks
uses: pre-commit/action@v3.0.1
# Run Test Coverage
test-coverage:
needs: [pre-commit]
name: AA Latest (Python ${{ matrix.python-version }} with ${{ matrix.database }})
runs-on: ubuntu-latest
strategy:
# Set Python versions to test against
matrix:
python-version:
- '3.10' # [LTS] Maintained until: October 2026
- '3.11' # [LTS] Maintained until: October 2027
- '3.12' # [LTS] Maintained until: October 2028
- '3.13' # [LTS] Maintained until: October 2029
# MySQL versions to test against
database:
# https://endoflife.date/mysql
- mysql:8.4 # [LTS] Maintained until: April 2032
# https://endoflife.date/mariadb and https://mariadb.com/kb/en/mariadb-server-release-dates/
- mariadb:10.11 # [LTS] Maintained until: February 2028
- mariadb:11.4 # [LTS] Maintained until: May 2029
# continue-on-error: ${{ matrix.python-version == '3.13' }}
# Set up services
services:
database:
image: ${{ matrix.database }}
env:
MYSQL_ROOT_PASSWORD: temp_password_aa_tox_tests
MYSQL_DATABASE: temp_allianceauth
ports:
- 3306:3306
options: --tmpfs /var/lib/mysql
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v6
- name: Install Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 'latest'
- name: Verify Redis is running
run: |
redis-cli ping
redis-cli info
# Set up Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
# AAv5 development branch requires libbz2-dev for some reason, so we need to install it before running Tox
- name: Install libbz2-dev
run: |
sudo apt-get update
sudo apt-get install -y libbz2-dev
# 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-latest
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'
)
)
&& (
matrix.python-version == '3.12'
&& matrix.database == 'mariadb:10.11'
)
}}
uses: codecov/codecov-action@v6
with:
files: coverage.xml
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}