This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66215e8
commit 1f57428
Showing
9 changed files
with
1,030 additions
and
63 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -72,29 +72,8 @@ jobs: | |
run: | | ||
python ./scripts/build_plist.py | ||
- name: Upload Artifacts | ||
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Themerr-plex.bundle | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | ||
path: | | ||
${{ github.workspace }} | ||
!**/*.git* | ||
!**/*.pyc | ||
!**/__pycache__ | ||
!**/plexhints* | ||
!**/Themerr-plex.bundle/.* | ||
!**/Themerr-plex.bundle/cache.sqlite | ||
!**/Themerr-plex.bundle/DOCKER_README.md | ||
!**/Themerr-plex.bundle/Dockerfile | ||
!**/Themerr-plex.bundle/docs | ||
!**/Themerr-plex.bundle/scripts | ||
!**/Themerr-plex.bundle/tests | ||
- name: Package Release | ||
shell: bash | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
run: | | ||
7z \ | ||
"-xr!*.git*" \ | ||
|
@@ -103,6 +82,7 @@ jobs: | |
"-xr!plexhints*" \ | ||
"-xr!Themerr-plex.bundle/.*" \ | ||
"-xr!Themerr-plex.bundle/cache.sqlite" \ | ||
"-xr!Themerr-plex.bundle/crowdin.yml" \ | ||
"-xr!Themerr-plex.bundle/DOCKER_README.md" \ | ||
"-xr!Themerr-plex.bundle/Dockerfile" \ | ||
"-xr!Themerr-plex.bundle/docs" \ | ||
|
@@ -113,6 +93,14 @@ jobs: | |
mkdir artifacts | ||
mv ./Themerr-plex.bundle.zip ./artifacts/ | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Themerr-plex.bundle | ||
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | ||
path: | | ||
${{ github.workspace }}/artifacts | ||
- name: Create Release | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
uses: LizardByte/.github/actions/create_release@master | ||
|
@@ -121,3 +109,130 @@ jobs: | |
next_version: ${{ needs.check_changelog.outputs.next_version }} | ||
last_version: ${{ needs.check_changelog.outputs.last_version }} | ||
release_body: ${{ needs.check_changelog.outputs.release_body }} | ||
|
||
pytest: | ||
needs: [build] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
PLEXAPI_AUTH_SERVER_BASEURL: http://127.0.0.1:32400 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: Themerr-plex.bundle | ||
|
||
- name: Extract artifacts zip | ||
shell: bash | ||
run: | | ||
# extract zip | ||
7z x Themerr-plex.bundle.zip -o. | ||
# move all files from "Themerr-plex.bundle" to root, with no target directory | ||
cp -r ./Themerr-plex.bundle/. . | ||
# remove zip | ||
rm Themerr-plex.bundle.zip | ||
- name: Debug after extract | ||
shell: bash | ||
run: | | ||
ls -a ./Contents | ||
- name: Set up Python | ||
uses: LizardByte/.github/actions/setup_python2@nightly | ||
|
||
- name: Install python dependencies | ||
shell: bash | ||
run: | | ||
python -m pip --no-python-version-warning --disable-pip-version-check install --upgrade \ | ||
pip setuptools wheel | ||
python -m pip --no-python-version-warning --disable-pip-version-check install -r requirements-dev.txt | ||
# python -m pip --no-python-version-warning --disable-pip-version-check install -r requirements.txt | ||
- name: Install Plex Media Server | ||
shell: bash | ||
run: | | ||
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | ||
choco install plexmediaserver | ||
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then | ||
brew install --cask plex-media-server | ||
# starting with pms 1.29.2 servers must be claimed... disable that | ||
# https://forums.plex.tv/t/new-server-claiming-requirement-for-macos/816337 | ||
defaults write com.plexapp.plexmediaserver enableLocalSecurity -bool FALSE | ||
open "/Applications/Plex Media Server.app" | ||
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | ||
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - | ||
echo deb https://downloads.plex.tv/repo/deb public main | \ | ||
sudo tee /etc/apt/sources.list.d/plexmediaserver.list | ||
sudo apt-get update | ||
sudo apt-get install plexmediaserver | ||
# plex home directory | ||
echo "Plex home directory: ${PLEX_HOME}" | ||
# stop service | ||
sudo systemctl stop plexmediaserver | ||
# start server in the background | ||
"/usr/lib/plexmediaserver/Plex Media Server" & | ||
else | ||
echo "Unknown OS: ${{ matrix.os }}" | ||
exit 1 | ||
fi | ||
- name: Update Plex registry settings | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
# starting with pmps 1.32.2 servers must be claimed... disable that | ||
# https://forums.plex.tv/t/new-claiming-requirement-for-windows/839096 | ||
REG ADD "HKCU\Software\Plex, Inc.\Plex Media Server" /v enableLocalSecurity /t REG_DWORD /d 0 /f | ||
- name: Bootstrap Plex server | ||
id: boostrap | ||
uses: nick-fields/[email protected] | ||
with: | ||
max_attempts: 3 | ||
timeout_minutes: 3 | ||
shell: bash | ||
command: | | ||
#if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | ||
# python \ | ||
# -u scripts/plex-bootstraptest.py \ | ||
# --destination plex \ | ||
# --advertise-ip 127.0.0.1 \ | ||
# --bootstrap-timeout 540 \ | ||
# --docker-tag latest \ | ||
# --without-shows \ | ||
# --without-music \ | ||
# --without-photos \ | ||
# --unclaimed | ||
#else | ||
python \ | ||
-u scripts/plex-bootstraptest.py \ | ||
--destination plex \ | ||
--advertise-ip 127.0.0.1 \ | ||
--bootstrap-timeout 540 \ | ||
--no-docker \ | ||
--server-name plex-test-${{ matrix.os }}-${{ github.run_id }} \ | ||
--without-shows \ | ||
--without-music \ | ||
--without-photos \ | ||
--unclaimed | ||
#fi | ||
# on_retry_command: | | ||
# docker rm -f $(docker ps --latest) | ||
|
||
- name: Test with pytest | ||
shell: bash # our Python 2.7 setup action doesn't support PowerShell | ||
run: | | ||
python -m pytest -v |
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
Oops, something went wrong.