-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/main' into 185-change-the-directory-of-the-c…
…onfigini-file-to-the-root
- Loading branch information
Showing
8 changed files
with
149 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Build for Windows, Release | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
tags: # Added to trigger the workflow on version tags | ||
- 'v*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
# Check-out repository | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
architecture: 'x64' | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
**/requirements*.txt | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --user virtualenv | ||
virtualenv .venv | ||
. .venv/Scripts/activate | ||
pip install pyinstaller | ||
pip install -r requirements.txt | ||
- name: Build .exe for Windows | ||
run: | | ||
. .venv/Scripts/activate | ||
pyinstaller -y --onefile --hidden-import=yaml --hidden-import=yaml.loader --hidden-import=colorlog ` | ||
--paths=.\.venv\Lib\site-packages\ --add-data "config/log_config.yaml;config" ` | ||
--add-data "modules/database/create_table_songs.sql;modules/database" ` | ||
--add-data "modules/database/create_table_songs_enhanced.sql;modules/database" ` | ||
--distpath . run.py | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ runner.os }} Build | ||
path: | | ||
*.exe | ||
# release: | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
# | ||
# # Download artifacts from previous build steps | ||
# - name: Download Windows Artifact | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: Windows Build | ||
# path: ./artifacts | ||
# | ||
# | ||
# # Log files after download | ||
# - name: List files after download | ||
# run: ls -R ./artifacts | ||
# | ||
# # Rename Windows artifact to a suitable name | ||
# - name: Rename Windows artifact | ||
# run: mv ./artifacts/run.exe ./artifacts/RocksmithServant-${{ github.ref_name }}.exe | ||
# | ||
# # Create a GitHub release | ||
# - name: Release | ||
# uses: softprops/action-gh-release@v2 | ||
# if: startsWith(github.ref, 'refs/tags/') | ||
# with: | ||
# tag_name: ${{ github.ref }} | ||
# name: ${{ github.ref_name }} | ||
# files: | | ||
# ./artifacts/*.exe | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
name: Pylint | ||
|
||
on: [push] | ||
on: | ||
push | ||
|
||
jobs: | ||
build: | ||
pylint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
python-version: [ "3.12" ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') --disable=missing-docstring --disable=too-few-public-methods | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
- name: Analysing the code with pylint | ||
run: | | ||
# TODO remove --disable=fixme while resolving issue #217 | ||
pylint $(git ls-files '*.py') --disable=missing-docstring --disable=too-few-public-methods --disable=fixme \ | ||
--ignore-paths='^new_stuffs_to_try_out/.*$' |
31 changes: 16 additions & 15 deletions
31
.github/workflows/python-package.yml → .github/workflows/python-tests.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
push | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
pytest: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.11" ] | ||
|
||
python-version: [ "3.12" ] | ||
os: [ ubuntu-latest, windows-latest ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
- name: Install dependencies ${{ matrix.os }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
- name: Test with pytest for Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
PYTHONPATH=. pytest | ||
- name: Test with pytest for Windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
$env:PYTHONPATH=$pwd | ||
pytest | ||
- name: Build EXE from Python Script | ||
uses: Nuitka/[email protected] | ||
Oops, something went wrong.