Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: mypy

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set up environment
run: |
bash scripts/venv.sh
- name: Analysing the code with mypy
run: |
. .venv/bin/activate
mypy passenger_wsgi.py
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ idna==3.10
itsdangerous==2.2.0
Jinja2==3.1.5
MarkupSafe==3.0.2
mypy==1.14.1
mypy-extensions==1.0.0
requests==2.32.3
types-requests==2.32.0.20241016
typing_extensions==4.12.2
urllib3==2.3.0
Werkzeug==3.1.3
6 changes: 3 additions & 3 deletions scripts/venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ function activate {
source $VENV_DIR/bin/activate
}

if [[ ! -f "$CONFIG_FILE" ]] then
if [ ! -f "$CONFIG_FILE" ]; then
# Create example config file
# NOTE: Empty for now
echo "LASTFM_API_KEY = \"abcef0123456789\"" >> $CONFIG_FILE
echo "LASTFM_API_SECRET = \"abcef0123456789\"" >> $CONFIG_FILE
fi

if [[ ! -d "$VENV_DIR" ]] then
if [ ! -d "$VENV_DIR" ]; then
# Create virtual environment and install required packages
$PYTHON -m venv "$VENV_DIR"
activate
pip install --upgrade pip
pip install -r "$REQUIREMENTS"
else
activate
Expand Down