Skip to content

CI fixes

CI fixes #81

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 3, Col: 4): Unexpected value ''
on:
# push:
# branches: [ main ]
# paths-ignore:
# - '**.md'
# - 'docs/**'
# - 'LICENSE'
# - '.github/ISSUE_TEMPLATE/**'
# pull_request:
# branches: [ main ]
# paths-ignore:
# - '**.md'
# - 'docs/**'
# - 'LICENSE'
# - '.github/ISSUE_TEMPLATE/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install typing-extensions rich click pefile olefile py7zr PyYAML requests pillow pytest packaging
# Install dev dependencies if needed, or just run tests if they don't need extra
- name: Run Tests
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)/src:$(pwd)/src/switchcraft:$(pwd)/src/switchcraft_advanced:$(pwd)/src/switchcraft_ai:$(pwd)/src/switchcraft_winget:$(pwd)/src/switchcraft_debug
python -m pytest tests
shell: bash
- name: Smoke Test (CLI)
run: |
python -m switchcraft.main --version
python -m switchcraft.main --help
shell: bash
- name: Linting
run: |
pip install flake8
# Stop the build if there are Python syntax errors or undefined names
flake8 src tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
shell: bash
- name: Check Translations (i18n)
run: |
python scripts/check_i18n.py
shell: bash
build_check:
name: Verify Build
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install pyinstaller customtkinter tkinterdnd2 pillow
- name: Build with PyInstaller
run: |
pyinstaller switchcraft.spec