updated docs #338
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: Swift | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
SPOTIFY_SWIFT_TESTING_CLIENT_ID: ${{ secrets.SPOTIFY_SWIFT_TESTING_CLIENT_ID }} | |
SPOTIFY_SWIFT_TESTING_CLIENT_SECRET: ${{ secrets.SPOTIFY_SWIFT_TESTING_CLIENT_SECRET }} | |
SPOTIFY_CLIENT_CREDENTIALS_FLOW_TOKENS_URL: ${{ secrets.SPOTIFY_CLIENT_CREDENTIALS_FLOW_TOKENS_URL }} | |
jobs: | |
test_macOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build macOS | |
run: | | |
python3 enable_testing.py true | |
swift build --build-tests | |
- name: Run tests macOS | |
run: | | |
swift test --filter "\ | |
AuthorizationScopesTests|\ | |
CodingAuthInfoTests|\ | |
CodingAuthorizationCodeFlowManagerTests|\ | |
CodingAuthorizationCodeFlowPKCEManagerTests|\ | |
CodingClientCredentialsFlowManagerTests|\ | |
CodingCurrentlyPlayingContextTests|\ | |
CodingPlaybackRequestTests|\ | |
CodingSpotifyUserTests|\ | |
CodingTimeReferenceTests|\ | |
CodingTrackAttributesTests|\ | |
CursorPagingObjectPlayHistoryCodingTests|\ | |
ExampleContentTests|\ | |
SpotifyAPIClientCredentialsFlowAlbumsTests|\ | |
SpotifyAPIClientCredentialsFlowArtistTests|\ | |
SpotifyAPIClientCredentialsFlowBrowseTests|\ | |
SpotifyAPIClientCredentialsFlowClientAuthorizationTests|\ | |
SpotifyAPIClientCredentialsFlowEpisodeTests|\ | |
SpotifyAPIClientCredentialsFlowErrorTests|\ | |
SpotifyAPIClientCredentialsFlowFollowTests|\ | |
SpotifyAPIClientCredentialsFlowProxyFollowTests|\ | |
SpotifyAPIClientCredentialsFlowInsufficientScopeTests|\ | |
SpotifyAPIClientCredentialsFlowMarketTests|\ | |
SpotifyAPIClientCredentialsFlowPlaylistsTests|\ | |
SpotifyAPIClientCredentialsFlowProxyArtistTests|\ | |
SpotifyAPIClientCredentialsFlowProxyAuthorizationTests|\ | |
SpotifyAPIClientCredentialsFlowProxyInsufficientScopeTests|\ | |
SpotifyAPIClientCredentialsFlowProxyRefreshTokensConcurrentTests|\ | |
SpotifyAPIClientCredentialsFlowRefreshTokensConcurrentTests|\ | |
SpotifyAPIClientCredentialsFlowSearchTests|\ | |
SpotifyAPIClientCredentialsFlowShowTests|\ | |
SpotifyAPIClientCredentialsFlowTrackTests|\ | |
SpotifyAPIClientCredentialsFlowUserProfileTests|\ | |
SpotifyIdentifierTests|\ | |
SpotifyPlayerErrorCodingTests|\ | |
RepeatModeTests\ | |
" | |
test_linux: | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
image: ["swift:5.6", "swift:5.7", "swift:5.8", "swift:5.9", "swift:5.10"] | |
runs-on: ubuntu-latest | |
container: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build ${{ matrix.image }} | |
run: | | |
apt-get update && apt-get install -y python3 | |
python3 enable_testing.py true | |
swift build --build-tests | |
- name: Run tests ${{ matrix.image }} | |
run: | | |
swift test --filter "\ | |
AuthorizationScopesTests|\ | |
CodingAuthInfoTests|\ | |
CodingAuthorizationCodeFlowManagerTests|\ | |
CodingAuthorizationCodeFlowPKCEManagerTests|\ | |
CodingClientCredentialsFlowManagerTests|\ | |
CodingCurrentlyPlayingContextTests|\ | |
CodingPlaybackRequestTests|\ | |
CodingSpotifyUserTests|\ | |
CodingTimeReferenceTests|\ | |
CodingTrackAttributesTests|\ | |
CursorPagingObjectPlayHistoryCodingTests|\ | |
ExampleContentTests|\ | |
SpotifyAPIClientCredentialsFlowAlbumsTests|\ | |
SpotifyAPIClientCredentialsFlowArtistTests|\ | |
SpotifyAPIClientCredentialsFlowBrowseTests|\ | |
SpotifyAPIClientCredentialsFlowClientAuthorizationTests|\ | |
SpotifyAPIClientCredentialsFlowEpisodeTests|\ | |
SpotifyAPIClientCredentialsFlowErrorTests|\ | |
SpotifyAPIClientCredentialsFlowFollowTests|\ | |
SpotifyAPIClientCredentialsFlowProxyFollowTests|\ | |
SpotifyAPIClientCredentialsFlowInsufficientScopeTests|\ | |
SpotifyAPIClientCredentialsFlowMarketTests|\ | |
SpotifyAPIClientCredentialsFlowPlaylistsTests|\ | |
SpotifyAPIClientCredentialsFlowProxyArtistTests|\ | |
SpotifyAPIClientCredentialsFlowProxyAuthorizationTests|\ | |
SpotifyAPIClientCredentialsFlowProxyInsufficientScopeTests|\ | |
SpotifyAPIClientCredentialsFlowProxyRefreshTokensConcurrentTests|\ | |
SpotifyAPIClientCredentialsFlowRefreshTokensConcurrentTests|\ | |
SpotifyAPIClientCredentialsFlowSearchTests|\ | |
SpotifyAPIClientCredentialsFlowShowTests|\ | |
SpotifyAPIClientCredentialsFlowTrackTests|\ | |
SpotifyAPIClientCredentialsFlowUserProfileTests|\ | |
SpotifyIdentifierTests|\ | |
SpotifyPlayerErrorCodingTests|\ | |
RepeatModeTests\ | |
" | |
test_other_platforms: | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
platform: ["platform=iOS Simulator,name=iPhone 15,OS=17.0", "platform=tvOS Simulator,name=Apple TV,OS=17.0"] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: configure environment variables | |
run: ./set_credentials.sh | |
- name: Build ${{ matrix.platform }} | |
run: | | |
python3 enable_testing.py true | |
env DEVELOPER_DIR="/Applications/Xcode_15.0.1.app" xcrun xcodebuild \ | |
-IDEClonedSourcePackagesDirPathOverride="$PWD/.dependencies" \ | |
-derivedDataPath "$PWD/.derivedData" \ | |
-scheme "SpotifyAPI-Package" \ | |
-destination "${{ matrix.platform }}" \ | |
build | |
- name: test ${{ matrix.platform }} | |
run: | | |
env DEVELOPER_DIR="/Applications/Xcode_15.0.1.app" xcrun xcodebuild \ | |
-IDEClonedSourcePackagesDirPathOverride="$PWD/.dependencies" \ | |
-derivedDataPath "$PWD/.derivedData" \ | |
-scheme "SpotifyAPI-Package" \ | |
-destination "${{ matrix.platform }}" \ | |
test \ | |
-only-testing "SpotifyAPIMainTests/AuthorizationScopesTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingAuthInfoTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingAuthorizationCodeFlowManagerTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingAuthorizationCodeFlowPKCEManagerTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingClientCredentialsFlowManagerTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingCurrentlyPlayingContextTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingPlaybackRequestTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingSpotifyUserTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingTimeReferenceTests" \ | |
-only-testing "SpotifyAPIMainTests/CodingTrackAttributesTests" \ | |
-only-testing "SpotifyAPIMainTests/CursorPagingObjectPlayHistoryCodingTests" \ | |
-only-testing "SpotifyAPIMainTests/ExampleContentTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowAlbumsTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowArtistTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowBrowseTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowClientAuthorizationTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowEpisodeTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowErrorTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowFollowTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowInsufficientScopeTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowMarketTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowPlaylistsTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowProxyArtistTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowProxyAuthorizationTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowProxyInsufficientScopeTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowProxyRefreshTokensConcurrentTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowRefreshTokensConcurrentTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowSearchTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowShowTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowTrackTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyAPIClientCredentialsFlowUserProfileTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyIdentifierTests" \ | |
-only-testing "SpotifyAPIMainTests/SpotifyPlayerErrorCodingTests" \ | |
-only-testing "SpotifyAPIMainTests/RepeatModeTests" | |
build_watch_os_mac_catalyst: | |
strategy: | |
matrix: | |
platform: ["platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=10.0", "platform=macOS,variant=Mac Catalyst"] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: build ${{ matrix.platform }} | |
run: | | |
env DEVELOPER_DIR="/Applications/Xcode_15.0.1.app" xcrun xcodebuild \ | |
-IDEClonedSourcePackagesDirPathOverride="$PWD/.dependencies" \ | |
-derivedDataPath "$PWD/.derivedData" build \ | |
-scheme "SpotifyAPI" \ | |
-destination "${{ matrix.platform }}" | |
build_spotify_api_server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: build | |
run: | | |
git clone https://github.com/Peter-Schorn/SpotifyAPIServer.git | |
cd SpotifyAPIServer | |
swift package edit SpotifyAPI --revision $GITHUB_SHA | |
swift build -Xswiftc -warnings-as-errors |