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 274cc89
Showing
7 changed files
with
851 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,83 @@ 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 }} | ||
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 -rT ./Themerr-plex.bundle . | ||
# remove empty directory | ||
rm -rf 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 docker | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
brew install docker | ||
- name: Bootstrap Plex server | ||
id: boostrap | ||
uses: nick-fields/[email protected] | ||
with: | ||
max_attempts: 3 | ||
timeout_minutes: 2 | ||
shell: bash | ||
command: | | ||
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 | ||
on_retry_command: | | ||
# remove docker container | ||
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.