Merge branch 'main' of https://github.com/UKR-PROJECTS/SSTube #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SSTube Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Upgrade pip and install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
pip install flake8 | |
flake8 --max-line-length=200 . | |
- name: Run tests | |
shell: cmd | |
run: | | |
pip install pytest | |
if exist tests ( | |
pytest tests | |
) else ( | |
echo "No tests directory found, skipping tests." | |
) | |
- name: Build executable with PyInstaller | |
run: | | |
pip install pyinstaller | |
pyinstaller --onefile --windowed src/SSTube.py | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SSTube-executable | |
path: dist/SSTube.exe |