-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
23 changed files
with
156 additions
and
233 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
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 |
---|---|---|
|
@@ -19,19 +19,14 @@ jobs: | |
msrv=$(cat crates/plex-api/Cargo.toml | grep rust-version | sed 's/.* = "//; s/"//') | ||
echo "msrv=$msrv" >> $GITHUB_OUTPUT | ||
- name: Install the toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
profile: minimal | ||
toolchain: ${{steps.current_msrv.outputs.msrv}} | ||
override: true | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
- name: Check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --workspace --all-targets | ||
run: cargo check --workspace --all-targets | ||
- name: Check the new MSRV | ||
if: ${{ failure() }} | ||
run: | | ||
|
@@ -45,18 +40,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
- name: Run cargo check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
run: cargo check | ||
|
||
lints: | ||
name: Lints | ||
|
@@ -65,22 +54,13 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: "rustfmt, clippy" | ||
components: "rustfmt,clippy" | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: "--all -- --check" | ||
run: cargo fmt --all -- --check | ||
- name: Clippy with warnings | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: "--all-targets --all-features -- -D warnings" | ||
run: cargo clippy --all-targets --all-features -- -D warnings |
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 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 |
---|---|---|
|
@@ -25,19 +25,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: "--package xtask -- test --offline" | ||
run: cargo run --package xtask -- test --offline | ||
|
||
test_on_real_server_anonymous: | ||
if: "!github.event.review" | ||
|
@@ -52,19 +45,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache-anonymous | ||
- name: "Test against real server [anonymous]" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: "--package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --deny-unknown-fields" | ||
run: cargo run --package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --deny-unknown-fields | ||
|
||
test_on_real_server_authenticated_free: | ||
if: "(github.ref == 'refs/heads/main' && !github.event.review) || github.event.review.state == 'approved' || github.repository == github.event.pull_request.head.repo.full_name" | ||
|
@@ -81,19 +67,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache-authenticated | ||
- name: "Test against real server [authenticated]" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: "--package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --token '${{ secrets.PLEX_API_AUTH_TOKEN_FREE }}' --deny-unknown-fields" | ||
run: cargo run --package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --token '${{ secrets.PLEX_API_AUTH_TOKEN_FREE }}' --deny-unknown-fields | ||
|
||
test_on_real_server_authenticated_plexpass: | ||
if: "(github.ref == 'refs/heads/main' && !github.event.review) || github.event.review.state == 'approved' || github.repository == github.event.pull_request.head.repo.full_name" | ||
|
@@ -110,19 +89,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache-authenticated | ||
- name: "Test against real server [authenticated]" | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: "--package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --token '${{ secrets.PLEX_API_AUTH_TOKEN_PLEXPASS }}' --deny-unknown-fields" | ||
run: cargo run --package xtask -- test --online --docker-tag '${{ matrix.plex_server_version }}' --token '${{ secrets.PLEX_API_AUTH_TOKEN_PLEXPASS }}' --deny-unknown-fields | ||
|
||
collect_coverage: | ||
if: "!github.event.review" | ||
|
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 |
---|---|---|
|
@@ -12,11 +12,7 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
|
@@ -26,10 +22,7 @@ jobs: | |
-H 'Accept: application/json' \ | ||
https://plex.tv/api/v2/features\?X-Plex-Product\=Plex%20Web\&X-Plex-Version\=4.77.3\&X-Plex-Client-Identifier\=${{ secrets.X_PLEX_CLIENT_IDENTIFIER_FREE }}\&X-Plex-Platform\=Safari\&X-Plex-Platform-Version\=15.4\&X-Plex-Sync-Version\=2\&X-Plex-Features\=external-media%2Cindirect-media\&X-Plex-Model\=hosted\&X-Plex-Device\=OSX\&X-Plex-Device-Name\=Safari\&X-Plex-Device-Screen-Resolution\=1440x772%2C1440x900\&X-Plex-Token\=${{ secrets.PLEX_API_AUTH_TOKEN_PLEXPASS }}\&X-Plex-Language\=en | ||
- name: Build plex-api | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: "--package plex-api" | ||
run: cargo build --package plex-api | ||
- name: Check if the enum was updated | ||
run: | | ||
if git diff --exit-code crates/plex-api/src/media_container/server/feature.rs | ||
|
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 |
---|---|---|
|
@@ -12,19 +12,12 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/[email protected] | ||
with: | ||
shared-key: cache | ||
- name: Build xtask | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: "--package xtask" | ||
run: cargo build --package xtask | ||
- id: tags | ||
run: | | ||
tags=$(cargo run -q --package xtask -- get-last-plex-tags --skip-tag latest --skip-tag beta --skip-tag plexpass) | ||
|
@@ -43,9 +36,9 @@ jobs: | |
sed -i 's/\(Test on a real server ([a-z ]*)\).* # supported-version-1/\1 (${{ steps.tags.outputs.last_tag }}) # supported-version-1/g' .github/mergify.yml | ||
sed -i 's/\(Test on a real server ([a-z ]*)\).* # supported-version-2/\1 (${{ steps.tags.outputs.second_tag }}) # supported-version-2/g' .github/mergify.yml | ||
sed -i 's/\(Test on a real server ([a-z ]*)\).* # supported-version-3/\1 (${{ steps.tags.outputs.first_tag }}) # supported-version-3/g' .github/mergify.yml | ||
- name: Update modify-data command | ||
- name: Update xtask/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED | ||
run: | | ||
sed -i 's/DEFAULT_TAG: &str = "[-a-z0-9.]*/DEFAULT_TAG: \&str = "${{ steps.tags.outputs.last_tag }}/g' crates/xtask/src/modify_data.rs | ||
sed -i 's/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED: &str = "[-a-z0-9.]*/DOCKER_PLEX_IMAGE_TAG_MIN_SUPPORTED: \&str = "${{ steps.tags.outputs.last_tag }}/g' crates/xtask/src/get_last_plex_tags.rs | ||
- name: Update the list in README.md | ||
run: | | ||
plex_tags="$(echo '${{ steps.tags.outputs.tags }}' | jq -r '.[] | "* \(.)"')" | ||
|
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
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
Oops, something went wrong.