shaka-player 4.6.4 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +9 -5
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.d.ts +46 -3
- package/dist/shaka-player.compiled.debug.d.ts +46 -3
- package/dist/shaka-player.compiled.debug.externs.js +45 -0
- package/dist/shaka-player.compiled.debug.js +382 -351
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +45 -0
- package/dist/shaka-player.compiled.js +1135 -1121
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +68 -4
- package/dist/shaka-player.ui.debug.d.ts +68 -4
- package/dist/shaka-player.ui.debug.externs.js +77 -0
- package/dist/shaka-player.ui.debug.js +428 -392
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +77 -0
- package/dist/shaka-player.ui.js +1304 -1290
- package/dist/shaka-player.ui.map +4 -4
- package/externs/mediasession.js +7 -0
- package/externs/shaka/abr_manager.js +8 -0
- package/externs/shaka/manifest.js +3 -3
- package/externs/shaka/player.js +59 -4
- package/lib/abr/simple_abr_manager.js +41 -15
- package/lib/cea/cea708_service.js +1 -1
- package/lib/cea/cea708_window.js +95 -7
- package/lib/dash/dash_parser.js +55 -11
- package/lib/media/adaptation_set_criteria.js +76 -10
- package/lib/media/media_source_engine.js +42 -18
- package/lib/media/segment_reference.js +12 -0
- package/lib/media/streaming_engine.js +55 -3
- package/lib/player.js +92 -6
- package/lib/util/cmsd_manager.js +269 -0
- package/lib/util/content_steering_manager.js +5 -1
- package/lib/util/mime_utils.js +6 -2
- package/lib/util/periods.js +108 -39
- package/lib/util/player_configuration.js +19 -5
- package/lib/util/stream_utils.js +82 -13
- package/package.json +1 -1
- package/ui/audio_language_selection.js +3 -0
- package/ui/controls.js +60 -0
- package/ui/externs/ui.js +12 -1
- package/ui/hidden_fast_forward_button.js +32 -0
- package/ui/hidden_rewind_button.js +32 -0
- package/ui/hidden_seek_button.js +121 -0
- package/ui/less/buttons.less +50 -0
- package/ui/less/containers.less +18 -0
- package/ui/resolution_selection.js +2 -0
- package/ui/ui.js +2 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -75
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/ISSUE_TEMPLATE/question.md +0 -26
- package/.github/config.yml +0 -1
- package/.github/workflows/appspot.yaml +0 -39
- package/.github/workflows/build-and-test.yaml +0 -222
- package/.github/workflows/compute-incremental-coverage.py +0 -265
- package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +0 -56
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +0 -37
- package/.github/workflows/deflake.yaml +0 -31
- package/.github/workflows/demo-version-index.yaml +0 -43
- package/.github/workflows/nightly-demo.yaml +0 -42
- package/.github/workflows/release-please.yaml +0 -193
- package/.github/workflows/report-incremental-coverage.yaml +0 -39
- package/.github/workflows/safari-homedir-launcher.sh +0 -18
- package/.github/workflows/selenium-lab-tests.yaml +0 -370
- package/.github/workflows/shaka-bot-commands/command-help.sh +0 -27
- package/.github/workflows/shaka-bot-commands/command-test.sh +0 -56
- package/.github/workflows/shaka-bot-commands/lib.sh +0 -83
- package/.github/workflows/shaka-bot-commands/main.sh +0 -51
- package/.github/workflows/sync-labels.yaml +0 -33
- package/.github/workflows/talk-to-shaka-bot.yaml +0 -29
- package/.github/workflows/update-issues.yaml +0 -31
- package/.github/workflows/update-screenshots.yaml +0 -142
- package/.github/workflows/validate-pr-title.yaml +0 -27
- package/CHANGELOG.md +0 -5774
- package/CODE_OF_CONDUCT.md +0 -93
- package/CONTRIBUTING.md +0 -76
- package/demo/TengwarTelcontar.woff2 +0 -0
- package/demo/app_logo_144.png +0 -0
- package/demo/app_logo_192.png +0 -0
- package/demo/app_logo_256.png +0 -0
- package/demo/app_logo_384.png +0 -0
- package/demo/app_logo_512.png +0 -0
- package/demo/app_manifest.json +0 -29
- package/demo/asset_card.js +0 -410
- package/demo/autoTemplate.txt +0 -61
- package/demo/cast_receiver/idle1.jpg +0 -0
- package/demo/cast_receiver/idle2.jpg +0 -0
- package/demo/cast_receiver/idle3.jpg +0 -0
- package/demo/cast_receiver/index.html +0 -75
- package/demo/cast_receiver/receiver_app.css +0 -111
- package/demo/cast_receiver/receiver_app.js +0 -158
- package/demo/close_button.js +0 -60
- package/demo/common/asset.js +0 -510
- package/demo/common/assets.js +0 -1634
- package/demo/config.js +0 -859
- package/demo/custom.js +0 -907
- package/demo/customWarning.txt +0 -8
- package/demo/demo.less +0 -591
- package/demo/demo_uncompiled.js +0 -11
- package/demo/demo_utils.js +0 -113
- package/demo/favicon.ico +0 -0
- package/demo/front.js +0 -156
- package/demo/icons/README.md +0 -4
- package/demo/icons/baseline-audiotrack-24px.svg +0 -1
- package/demo/icons/baseline-closed_caption-24px.svg +0 -1
- package/demo/icons/baseline-fast_forward-24px.svg +0 -1
- package/demo/icons/baseline-language-24px.svg +0 -1
- package/demo/icons/baseline-live_tv-24px.svg +0 -1
- package/demo/icons/baseline-subtitles-24px.svg +0 -1
- package/demo/icons/baseline-surround_sound-24px.svg +0 -1
- package/demo/icons/custom_ad.svg +0 -1
- package/demo/icons/custom_box_with_text.svg +0 -1
- package/demo/icons/custom_clear_key.svg +0 -1
- package/demo/icons/custom_high_definition.svg +0 -1
- package/demo/icons/custom_playready.svg +0 -1
- package/demo/icons/custom_ultra_high_definition.svg +0 -1
- package/demo/icons/custom_widevine.svg +0 -1
- package/demo/index.html +0 -173
- package/demo/input.js +0 -270
- package/demo/input_container.js +0 -218
- package/demo/load.js +0 -156
- package/demo/main.js +0 -1854
- package/demo/search.js +0 -452
- package/demo/service_worker.js +0 -355
- package/demo/shaka_logo_trans.png +0 -0
- package/demo/tooltip.js +0 -29
- package/demo/visualizer.js +0 -335
- package/demo/visualizer_button.js +0 -84
- package/dist/demo.compiled.debug.js +0 -340
- package/dist/demo.compiled.debug.map +0 -8
- package/dist/demo.compiled.js +0 -340
- package/dist/demo.compiled.map +0 -8
- package/dist/demo.css +0 -6
- package/dist/demo.css.map +0 -1
- package/dist/receiver.compiled.debug.js +0 -187
- package/dist/receiver.compiled.debug.map +0 -8
- package/dist/receiver.compiled.js +0 -187
- package/dist/receiver.compiled.map +0 -8
- package/docs/announcement-list-join-group.png +0 -0
- package/docs/api-mainpage.md +0 -28
- package/docs/design/REDESIGN.md +0 -283
- package/docs/design/architecture.md +0 -13
- package/docs/design/bg-fetch-after.gv +0 -29
- package/docs/design/bg-fetch-after.gv.png +0 -0
- package/docs/design/bg-fetch-before.gv +0 -18
- package/docs/design/bg-fetch-before.gv.png +0 -0
- package/docs/design/bg-fetch.md +0 -134
- package/docs/design/cast.gv +0 -35
- package/docs/design/cast.gv.png +0 -0
- package/docs/design/chromecast.md +0 -151
- package/docs/design/codec_preferences.md +0 -158
- package/docs/design/dash-audio-channels.md +0 -123
- package/docs/design/dash-manifests.md +0 -248
- package/docs/design/dash-timeline.svg +0 -4
- package/docs/design/dataflow.gv +0 -66
- package/docs/design/dataflow.gv.png +0 -0
- package/docs/design/export.md +0 -70
- package/docs/design/fuzzy-locale-matching.md +0 -40
- package/docs/design/gap-jumping.md +0 -151
- package/docs/design/lcevc-architecture.png +0 -0
- package/docs/design/lcevc-demo.png +0 -0
- package/docs/design/lcevc-integration.md +0 -72
- package/docs/design/locale_compatibility.svg +0 -1
- package/docs/design/locales_tree.svg +0 -1
- package/docs/design/localization-design-principles.md +0 -158
- package/docs/design/newdemo.gv +0 -83
- package/docs/design/newdemo.gv.png +0 -0
- package/docs/design/offline.gv +0 -43
- package/docs/design/offline.gv.png +0 -0
- package/docs/design/offline.md +0 -153
- package/docs/design/ownership.gv +0 -76
- package/docs/design/ownership.gv.png +0 -0
- package/docs/design/preload.md +0 -299
- package/docs/design/preload.png +0 -0
- package/docs/design/talking-about-languages.md +0 -46
- package/docs/design/timeline.svg +0 -152
- package/docs/design/ui.md +0 -31
- package/docs/design/ui_player_relationships.svg +0 -1
- package/docs/jsdoc-plugin.js +0 -74
- package/docs/jsdoc-template/README.md +0 -1
- package/docs/jsdoc-template/publish.js +0 -879
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/jsdoc-template/static/scripts/linenumber.js +0 -44
- package/docs/jsdoc-template/static/scripts/show-widget.js +0 -55
- package/docs/jsdoc-template/static/styles/jsdoc-default.css +0 -438
- package/docs/jsdoc-template/tmpl/augments.tmpl +0 -10
- package/docs/jsdoc-template/tmpl/container.tmpl +0 -205
- package/docs/jsdoc-template/tmpl/details.tmpl +0 -152
- package/docs/jsdoc-template/tmpl/example.tmpl +0 -2
- package/docs/jsdoc-template/tmpl/examples.tmpl +0 -13
- package/docs/jsdoc-template/tmpl/exceptions.tmpl +0 -32
- package/docs/jsdoc-template/tmpl/layout.tmpl +0 -50
- package/docs/jsdoc-template/tmpl/mainpage.tmpl +0 -14
- package/docs/jsdoc-template/tmpl/members.tmpl +0 -47
- package/docs/jsdoc-template/tmpl/method.tmpl +0 -140
- package/docs/jsdoc-template/tmpl/modifies.tmpl +0 -14
- package/docs/jsdoc-template/tmpl/params.tmpl +0 -131
- package/docs/jsdoc-template/tmpl/properties.tmpl +0 -125
- package/docs/jsdoc-template/tmpl/returns.tmpl +0 -19
- package/docs/jsdoc-template/tmpl/source.tmpl +0 -8
- package/docs/jsdoc-template/tmpl/tutorial.tmpl +0 -21
- package/docs/jsdoc-template/tmpl/type.tmpl +0 -7
- package/docs/jsdoc.conf.json +0 -38
- package/docs/shaka-player-logo.png +0 -0
- package/docs/style.md +0 -174
- package/docs/tutorials/a11y.md +0 -64
- package/docs/tutorials/ad_monetization.md +0 -292
- package/docs/tutorials/application-level-redirects.md +0 -94
- package/docs/tutorials/architecture.md +0 -32
- package/docs/tutorials/basic-usage.md +0 -89
- package/docs/tutorials/blob-url.md +0 -15
- package/docs/tutorials/config.md +0 -148
- package/docs/tutorials/debugging.md +0 -189
- package/docs/tutorials/drm-config.md +0 -274
- package/docs/tutorials/errors.md +0 -95
- package/docs/tutorials/fairplay.md +0 -242
- package/docs/tutorials/faq.md +0 -252
- package/docs/tutorials/index.json +0 -29
- package/docs/tutorials/lcevc.md +0 -118
- package/docs/tutorials/license-server-auth.md +0 -248
- package/docs/tutorials/license-wrapping.md +0 -168
- package/docs/tutorials/manifest-parser.md +0 -365
- package/docs/tutorials/network-and-buffering-config.md +0 -119
- package/docs/tutorials/offline.md +0 -683
- package/docs/tutorials/plugins.md +0 -184
- package/docs/tutorials/selenium-grid-config.md +0 -174
- package/docs/tutorials/service-worker.md +0 -106
- package/docs/tutorials/ui-customization.md +0 -288
- package/docs/tutorials/ui.md +0 -232
- package/docs/tutorials/upgrade-manifest.md +0 -281
- package/docs/tutorials/upgrade.md +0 -104
- package/docs/tutorials/welcome.md +0 -108
- package/docs/tutorials/widevine-service-certs.md +0 -45
- package/karma.conf.js +0 -879
- package/maintained-branches.md +0 -15
- package/roadmap.md +0 -186
- package/test/abr/simple_abr_manager_unit.js +0 -398
- package/test/ads/ad_manager_unit.js +0 -260
- package/test/assumptions/uint8_array_unit.js +0 -22
- package/test/cast/cast_proxy_unit.js +0 -736
- package/test/cast/cast_receiver_integration.js +0 -488
- package/test/cast/cast_receiver_unit.js +0 -1183
- package/test/cast/cast_sender_unit.js +0 -973
- package/test/cast/cast_utils_unit.js +0 -311
- package/test/cea/cea608_memory_unit.js +0 -411
- package/test/cea/cea708_service_unit.js +0 -674
- package/test/cea/cea708_window_unit.js +0 -373
- package/test/cea/cea_decoder_unit.js +0 -615
- package/test/cea/dtvcc_packet_builder_unit.js +0 -158
- package/test/cea/dtvcc_packet_unit.js +0 -60
- package/test/cea/mp4_cea_parser_unit.js +0 -127
- package/test/codec_switching/codec_switching_integration.js +0 -182
- package/test/dash/dash_parser_content_protection_unit.js +0 -998
- package/test/dash/dash_parser_integration.js +0 -74
- package/test/dash/dash_parser_live_unit.js +0 -1542
- package/test/dash/dash_parser_manifest_unit.js +0 -3121
- package/test/dash/dash_parser_segment_base_unit.js +0 -421
- package/test/dash/dash_parser_segment_list_unit.js +0 -380
- package/test/dash/dash_parser_segment_template_unit.js +0 -910
- package/test/dash/mpd_utils_unit.js +0 -794
- package/test/demo/demo_unit.js +0 -108
- package/test/deprecate/enforcer_unit.js +0 -74
- package/test/deprecate/version_unit.js +0 -57
- package/test/hls/hls_live_unit.js +0 -1330
- package/test/hls/hls_parser_unit.js +0 -5276
- package/test/hls/manifest_text_parser_unit.js +0 -545
- package/test/media/adaptation_set_criteria_unit.js +0 -806
- package/test/media/adaptation_set_unit.js +0 -229
- package/test/media/buffering_observer_unit.js +0 -143
- package/test/media/closed_caption_parser_unit.js +0 -18
- package/test/media/content_workarounds_unit.js +0 -43
- package/test/media/drm_engine_integration.js +0 -356
- package/test/media/drm_engine_unit.js +0 -2805
- package/test/media/media_source_engine_integration.js +0 -691
- package/test/media/media_source_engine_unit.js +0 -1512
- package/test/media/mp4_segment_index_parser_unit.js +0 -80
- package/test/media/play_rate_controller_unit.js +0 -69
- package/test/media/playhead_unit.js +0 -1394
- package/test/media/presentation_timeline_unit.js +0 -477
- package/test/media/quality_observer_unit.js +0 -138
- package/test/media/region_observer_unit.js +0 -374
- package/test/media/region_timeline_unit.js +0 -139
- package/test/media/segment_index_unit.js +0 -1080
- package/test/media/segment_prefetch_unit.js +0 -243
- package/test/media/segment_reference_unit.js +0 -63
- package/test/media/stall_detector_unit.js +0 -184
- package/test/media/streaming_engine_integration.js +0 -632
- package/test/media/streaming_engine_unit.js +0 -4211
- package/test/media/time_ranges_utils_unit.js +0 -123
- package/test/media/webm_segment_index_parser_unit.js +0 -90
- package/test/mss/mss_parser_content_protection_unit.js +0 -49
- package/test/mss/mss_parser_unit.js +0 -474
- package/test/mss/mss_player_integration.js +0 -124
- package/test/net/data_uri_plugin_unit.js +0 -105
- package/test/net/http_plugin_unit.js +0 -439
- package/test/net/networking_engine_unit.js +0 -1236
- package/test/net/networking_utils_unit.js +0 -37
- package/test/offline/download_progress_estimator_unit.js +0 -90
- package/test/offline/indexeddb_storage_unit.js +0 -192
- package/test/offline/manifest_convert_unit.js +0 -622
- package/test/offline/offline_integration.js +0 -168
- package/test/offline/offline_manifest_parser_unit.js +0 -231
- package/test/offline/offline_scheme_unit.js +0 -154
- package/test/offline/offline_uri_unit.js +0 -59
- package/test/offline/storage_compatibility_unit.js +0 -344
- package/test/offline/storage_integration.js +0 -1858
- package/test/player_external.js +0 -237
- package/test/player_integration.js +0 -1371
- package/test/player_load_graph_integration.js +0 -865
- package/test/player_src_equals_external.js +0 -154
- package/test/player_src_equals_integration.js +0 -527
- package/test/player_unit.js +0 -4434
- package/test/polyfill/media_capabilities_unit.js +0 -277
- package/test/polyfill/patchedmediakeys_apple_unit.js +0 -130
- package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
- package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
- package/test/test/assets/3675/dash_0.mpd +0 -30
- package/test/test/assets/3675/dash_1.mpd +0 -30
- package/test/test/assets/3675/dash_2.mpd +0 -30
- package/test/test/assets/3675/dash_3.mpd +0 -30
- package/test/test/assets/3675/dash_4.mpd +0 -30
- package/test/test/assets/3675/dash_5.mpd +0 -26
- package/test/test/assets/3675/init-stream0.m4s +0 -0
- package/test/test/assets/audio-xhe-aac.mp4 +0 -0
- package/test/test/assets/audio.ts +0 -0
- package/test/test/assets/captions-test.ts +0 -0
- package/test/test/assets/cea-init.mp4 +0 -0
- package/test/test/assets/cea-segment.mp4 +0 -0
- package/test/test/assets/chapters.srt +0 -11
- package/test/test/assets/chapters.vtt +0 -10
- package/test/test/assets/chapters2.vtt +0 -10
- package/test/test/assets/dash-aes-128/Fragments(video=0,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=20000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=40000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=60000000,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/Fragments(video=i,format=mpd-time-csf) +0 -0
- package/test/test/assets/dash-aes-128/dash.mpd +0 -18
- package/test/test/assets/dash-aes-128/license +0 -1
- package/test/test/assets/dash-multi-codec/audio_en_2c_128k_aac.mp4 +0 -0
- package/test/test/assets/dash-multi-codec/audio_es_2c_64k_opus.webm +0 -0
- package/test/test/assets/dash-multi-codec/dash.mpd +0 -32
- package/test/test/assets/dash-multi-codec/video_144p_108k_h264.mp4 +0 -0
- package/test/test/assets/db-dump-v1.json +0 -1
- package/test/test/assets/db-dump-v2-broken.json +0 -1
- package/test/test/assets/db-dump-v2-clean.json +0 -1
- package/test/test/assets/db-dump-v3.json +0 -1
- package/test/test/assets/db-dump-v4-broken.json +0 -1
- package/test/test/assets/db-dump-v5.json +0 -1
- package/test/test/assets/empty_caption_video_init.mp4 +0 -0
- package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-audio-init.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-audio-segment.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-video-init.mp4 +0 -0
- package/test/test/assets/encrypted-sintel-video-segment.mp4 +0 -0
- package/test/test/assets/green-pixel.mp4 +0 -0
- package/test/test/assets/green-pixel.txt +0 -15
- package/test/test/assets/h265-cea-init.mp4 +0 -0
- package/test/test/assets/h265-cea-segment.mp4 +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence0.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence1.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence2.aac +0 -0
- package/test/test/assets/hls-raw-aac/fileSequence3.aac +0 -0
- package/test/test/assets/hls-raw-aac/manifest.m3u8 +0 -4
- package/test/test/assets/hls-raw-aac/stream.m4a.m3u8 +0 -14
- package/test/test/assets/hls-raw-ac3/fileSequence0.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence1.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence2.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence3.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence4.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence5.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence6.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/fileSequence7.ac3 +0 -0
- package/test/test/assets/hls-raw-ac3/prog_index.m3u8 +0 -31
- package/test/test/assets/hls-raw-ec3/fileSequence0.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence1.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence2.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence3.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence4.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence5.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence6.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/fileSequence7.ec3 +0 -0
- package/test/test/assets/hls-raw-ec3/prog_index.m3u8 +0 -31
- package/test/test/assets/hls-raw-mp3/chunklist_w905519204.m3u8 +0 -13
- package/test/test/assets/hls-raw-mp3/media_w905519204_0.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_1.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_2.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/media_w905519204_3.mp3 +0 -0
- package/test/test/assets/hls-raw-mp3/playlist.m3u8 +0 -4
- package/test/test/assets/hls-ts-aac/playlist.m3u8 +0 -23
- package/test/test/assets/hls-ts-aac/segment_0.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_1.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_2.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_3.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_4.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_5.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_6.ts +0 -0
- package/test/test/assets/hls-ts-aac/segment_7.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ac3/prog_index.m3u8 +0 -19
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0004.ts +0 -0
- package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0005.ts +0 -0
- package/test/test/assets/hls-ts-ec3/prog_index.m3u8 +0 -19
- package/test/test/assets/hls-ts-h264/fileSequence0.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence1.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence2.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence3.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence4.ts +0 -0
- package/test/test/assets/hls-ts-h264/fileSequence5.ts +0 -0
- package/test/test/assets/hls-ts-h264/prog_index.m3u8 +0 -25
- package/test/test/assets/hls-ts-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-h265/hevc.m3u8 +0 -6
- package/test/test/assets/hls-ts-h265/index.m3u8 +0 -7
- package/test/test/assets/hls-ts-mp3/manifest.m3u8 +0 -13
- package/test/test/assets/hls-ts-mp3/media_w239891843_0.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_1.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_2.ts +0 -0
- package/test/test/assets/hls-ts-mp3/media_w239891843_3.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/chunk.m3u8 +0 -17
- package/test/test/assets/hls-ts-muxed-aac-h264/n_0_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_1_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_2_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_3_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_4_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/n_5_0_0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h264/playlist.m3u8 +0 -4
- package/test/test/assets/hls-ts-muxed-aac-h265/0.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +0 -9
- package/test/test/assets/hls-ts-muxed-ac3-h264/media.m3u8 +0 -24
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00004.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ac3-h264/s_00005.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0000.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0001.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0002.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0003.ts +0 -0
- package/test/test/assets/hls-ts-muxed-ec3-h264/prog_index.m3u8 +0 -14
- package/test/test/assets/hls-ts-muxed-mp3-h264/index.m3u8 +0 -23
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-1-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-2-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-3-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-4-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-5-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-6-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-7-v1-a1.ts +0 -0
- package/test/test/assets/hls-ts-muxed-mp3-h264/seg-8-v1-a1.ts +0 -0
- package/test/test/assets/id3-metadata.aac +0 -0
- package/test/test/assets/id3-metadata.ts +0 -0
- package/test/test/assets/index-segment.mp4 +0 -0
- package/test/test/assets/index-segment.webm +0 -0
- package/test/test/assets/init-segment.webm +0 -0
- package/test/test/assets/large_file.mpd +0 -4930
- package/test/test/assets/multidrm-audio-init.mp4 +0 -0
- package/test/test/assets/multidrm-audio-segment.mp4 +0 -0
- package/test/test/assets/multidrm-video-init.mp4 +0 -0
- package/test/test/assets/multidrm-video-segment.mp4 +0 -0
- package/test/test/assets/multiple-trun-init.mp4 +0 -0
- package/test/test/assets/multiple-trun-segment.mp4 +0 -0
- package/test/test/assets/sintel-audio-init.mp4 +0 -0
- package/test/test/assets/sintel-audio-segment.mp4 +0 -0
- package/test/test/assets/sintel-video-init.mp4 +0 -0
- package/test/test/assets/sintel-video-segment.mp4 +0 -0
- package/test/test/assets/small.mp4 +0 -0
- package/test/test/assets/text-clip-alt.vtt +0 -63
- package/test/test/assets/text-clip.vtt +0 -63
- package/test/test/assets/thumbnails-sprites.vtt +0 -10
- package/test/test/assets/thumbnails.vtt +0 -10
- package/test/test/assets/ttml-init.mp4 +0 -0
- package/test/test/assets/ttml-segment-multiplemdat.mp4 +0 -0
- package/test/test/assets/ttml-segment.mp4 +0 -0
- package/test/test/assets/video.ts +0 -0
- package/test/test/assets/vtt-init.mp4 +0 -0
- package/test/test/assets/vtt-segment-multi-payload.mp4 +0 -0
- package/test/test/assets/vtt-segment-no-duration.mp4 +0 -0
- package/test/test/assets/vtt-segment-settings.mp4 +0 -0
- package/test/test/assets/vtt-segment.mp4 +0 -0
- package/test/test/boot.js +0 -495
- package/test/test/externs/filters.js +0 -44
- package/test/test/externs/fontfaceonload.js +0 -29
- package/test/test/externs/jasmine.js +0 -670
- package/test/test/externs/karma.js +0 -26
- package/test/test/externs/require.js +0 -21
- package/test/test/externs/sprintf.js +0 -18
- package/test/test/namespace.js +0 -10
- package/test/test/util/canned_idb.js +0 -379
- package/test/test/util/cea_utils.js +0 -60
- package/test/test/util/dash_parser_util.js +0 -329
- package/test/test/util/fake_ad.js +0 -321
- package/test/test/util/fake_ad_manager.js +0 -122
- package/test/test/util/fake_demo_main.js +0 -144
- package/test/test/util/fake_drm_engine.js +0 -103
- package/test/test/util/fake_media_source_engine.js +0 -464
- package/test/test/util/fake_networking_engine.js +0 -381
- package/test/test/util/fake_segment_prefetch.js +0 -84
- package/test/test/util/fake_text_displayer.js +0 -60
- package/test/test/util/id3_generator.js +0 -100
- package/test/test/util/indexeddb_utils.js +0 -124
- package/test/test/util/jasmine_fetch.js +0 -382
- package/test/test/util/layout_tests.js +0 -435
- package/test/test/util/loader.js +0 -88
- package/test/test/util/manifest_generator.js +0 -705
- package/test/test/util/manifest_parser_util.js +0 -101
- package/test/test/util/mss_parser_util.js +0 -119
- package/test/test/util/offline_utils.js +0 -105
- package/test/test/util/simple_fakes.js +0 -535
- package/test/test/util/stream_generator.js +0 -676
- package/test/test/util/streaming_engine_util.js +0 -506
- package/test/test/util/test_scheme.js +0 -778
- package/test/test/util/ttml_utils.js +0 -77
- package/test/test/util/ui_utils.js +0 -183
- package/test/test/util/util.js +0 -374
- package/test/test/util/waiter.js +0 -406
- package/test/text/cue_integration.js +0 -51
- package/test/text/lrc_text_parser_unit.js +0 -98
- package/test/text/mp4_ttml_parser_unit.js +0 -171
- package/test/text/mp4_vtt_parser_unit.js +0 -195
- package/test/text/sbv_text_parser_unit.js +0 -81
- package/test/text/simple_text_displayer_unit.js +0 -468
- package/test/text/srt_text_parser_unit.js +0 -163
- package/test/text/ssa_text_parser_unit.js +0 -382
- package/test/text/text_displayer_layout_unit.js +0 -323
- package/test/text/text_engine_unit.js +0 -500
- package/test/text/text_track_integration.js +0 -186
- package/test/text/ttml_text_parser_unit.js +0 -2176
- package/test/text/ui_text_displayer_unit.js +0 -608
- package/test/text/vtt_text_parser_unit.js +0 -1363
- package/test/text/web_vtt_generator_unit.js +0 -144
- package/test/text/web_vtt_layout_integration.js +0 -524
- package/test/transmuxer/transmuxer_engine_integration.js +0 -69
- package/test/transmuxer/transmuxer_integration.js +0 -443
- package/test/ui/ad_ui_unit.js +0 -369
- package/test/ui/localization_unit.js +0 -508
- package/test/ui/ui_customization_unit.js +0 -208
- package/test/ui/ui_integration.js +0 -669
- package/test/ui/ui_unit.js +0 -902
- package/test/util/abortable_operation_unit.js +0 -624
- package/test/util/array_utils_unit.js +0 -58
- package/test/util/buffer_utils_unit.js +0 -185
- package/test/util/cmcd_manager_unit.js +0 -440
- package/test/util/content_steering_manager_unit.js +0 -427
- package/test/util/data_view_reader_unit.js +0 -254
- package/test/util/ebml_parser_unit.js +0 -297
- package/test/util/event_manager_unit.js +0 -185
- package/test/util/fake_event_target_unit.js +0 -123
- package/test/util/id3_utils_unit.js +0 -168
- package/test/util/iterables_unit.js +0 -68
- package/test/util/language_utils_unit.js +0 -240
- package/test/util/manifest_parser_utils_unit.js +0 -55
- package/test/util/mime_utils_unit.js +0 -64
- package/test/util/mp4_box_parsers_unit.js +0 -246
- package/test/util/mp4_parser_unit.js +0 -373
- package/test/util/multi_map_unit.js +0 -94
- package/test/util/object_utils_unit.js +0 -79
- package/test/util/periods_unit.js +0 -1623
- package/test/util/pssh_unit.js +0 -226
- package/test/util/state_history_unit.js +0 -101
- package/test/util/stream_utils_unit.js +0 -1068
- package/test/util/string_utils_unit.js +0 -166
- package/test/util/text_parser_unit.js +0 -165
- package/test/util/ts_parser_unit.js +0 -77
- package/test/util/xml_utils_unit.js +0 -444
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Deploy to Appspot (one-off)
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
# Allows for manual triggering, to correct deployment issues.
|
|
6
|
-
inputs:
|
|
7
|
-
ref:
|
|
8
|
-
description: "A tag name or SHA1 to deploy."
|
|
9
|
-
required: true
|
|
10
|
-
subdomain:
|
|
11
|
-
description: "An appspot subdomain to deploy to. Be careful! Do not overwrite an existing subdomain!"
|
|
12
|
-
required: true
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
appspot:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v3
|
|
19
|
-
with:
|
|
20
|
-
ref: ${{ inputs.ref }}
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
persist-credentials: false
|
|
23
|
-
|
|
24
|
-
- uses: actions/setup-node@v1
|
|
25
|
-
with:
|
|
26
|
-
node-version: 16
|
|
27
|
-
registry-url: 'https://registry.npmjs.org'
|
|
28
|
-
|
|
29
|
-
- uses: ./.github/workflows/custom-actions/prep-for-appspot
|
|
30
|
-
|
|
31
|
-
- uses: google-github-actions/auth@v0
|
|
32
|
-
with:
|
|
33
|
-
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
34
|
-
|
|
35
|
-
- uses: google-github-actions/deploy-appengine@v0
|
|
36
|
-
with:
|
|
37
|
-
project_id: shaka-player-demo
|
|
38
|
-
version: ${{ inputs.subdomain }}
|
|
39
|
-
promote: false
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
name: Build and Test PR
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request: # Trigger for pull requests.
|
|
5
|
-
types: [opened, synchronize, reopened, ready_for_review]
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
- v[0-9]*
|
|
9
|
-
workflow_dispatch: # Allows for manual triggering.
|
|
10
|
-
inputs:
|
|
11
|
-
ref:
|
|
12
|
-
description: "The ref to build and test."
|
|
13
|
-
required: false
|
|
14
|
-
|
|
15
|
-
# If another instance of this workflow is started for the same PR, cancel the
|
|
16
|
-
# old one. If a PR is updated and a new test run is started, the old test run
|
|
17
|
-
# will be cancelled automatically to conserve resources.
|
|
18
|
-
concurrency:
|
|
19
|
-
group: ${{ github.workflow }}-${{ inputs.ref || github.ref }}
|
|
20
|
-
cancel-in-progress: true
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
lint:
|
|
24
|
-
name: Lint
|
|
25
|
-
runs-on: ubuntu-latest
|
|
26
|
-
steps:
|
|
27
|
-
- name: Checkout code
|
|
28
|
-
uses: actions/checkout@v3
|
|
29
|
-
with:
|
|
30
|
-
ref: ${{ inputs.ref || github.ref }}
|
|
31
|
-
|
|
32
|
-
- name: Lint
|
|
33
|
-
run: python build/check.py
|
|
34
|
-
|
|
35
|
-
build_and_test:
|
|
36
|
-
# Don't waste time doing a full matrix of test runs when there was an
|
|
37
|
-
# obvious linter error.
|
|
38
|
-
needs: lint
|
|
39
|
-
strategy:
|
|
40
|
-
matrix:
|
|
41
|
-
include:
|
|
42
|
-
# Run Linux browsers with xvfb, so they're in a headless X session.
|
|
43
|
-
# Additionally, generate a code coverage report from Linux Chrome.
|
|
44
|
-
# It should be the uncompiled build, or else we won't execute any
|
|
45
|
-
# coverage instrumentation on full-stack player integration tests.
|
|
46
|
-
- os: ubuntu-latest
|
|
47
|
-
browser: Chrome
|
|
48
|
-
extra_flags: "--use-xvfb"
|
|
49
|
-
- os: ubuntu-latest
|
|
50
|
-
browser: Firefox
|
|
51
|
-
extra_flags: "--use-xvfb"
|
|
52
|
-
- os: ubuntu-latest
|
|
53
|
-
browser: Edge
|
|
54
|
-
extra_flags: "--use-xvfb"
|
|
55
|
-
|
|
56
|
-
- os: macos-latest
|
|
57
|
-
browser: Chrome
|
|
58
|
-
- os: macos-latest
|
|
59
|
-
browser: Firefox
|
|
60
|
-
- os: macos-latest
|
|
61
|
-
browser: Edge
|
|
62
|
-
- os: macos-latest
|
|
63
|
-
browser: Safari
|
|
64
|
-
- os: macos-latest
|
|
65
|
-
browser: Safari-old
|
|
66
|
-
|
|
67
|
-
- os: windows-latest
|
|
68
|
-
browser: Chrome
|
|
69
|
-
- os: windows-latest
|
|
70
|
-
browser: Firefox
|
|
71
|
-
- os: windows-latest
|
|
72
|
-
browser: Edge
|
|
73
|
-
extra_flags: "--html-coverage-report --uncompiled"
|
|
74
|
-
|
|
75
|
-
# Disable fail-fast so that one matrix-job failing doesn't make the other
|
|
76
|
-
# ones end early.
|
|
77
|
-
fail-fast: false
|
|
78
|
-
|
|
79
|
-
name: ${{ matrix.os }} ${{ matrix.browser }}
|
|
80
|
-
runs-on: ${{ matrix.os }}
|
|
81
|
-
|
|
82
|
-
steps:
|
|
83
|
-
# Firefox on Ubuntu appears to not have the right things installed in
|
|
84
|
-
# the environment used by GitHub actions, so make sure that ffmpeg is
|
|
85
|
-
# installed. Otherwise, the browser might not support some codecs that the
|
|
86
|
-
# tests assume will be supported.
|
|
87
|
-
- name: Install FFmpeg
|
|
88
|
-
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'Firefox'
|
|
89
|
-
run: sudo apt -y update && sudo apt -y install ffmpeg
|
|
90
|
-
|
|
91
|
-
- name: Checkout code
|
|
92
|
-
uses: actions/checkout@v3
|
|
93
|
-
with:
|
|
94
|
-
ref: ${{ inputs.ref || github.ref }}
|
|
95
|
-
|
|
96
|
-
# Older versions of Safari can be installed, but not to the root, and it
|
|
97
|
-
# can't replace the standard version, at least not on GitHub's VMs. If
|
|
98
|
-
# you try to install directly to the root with sudo, it will appear to
|
|
99
|
-
# succeed, but will have no effect. If you try to script it explicitly
|
|
100
|
-
# with rm -rf and cp, this will fail. Safari may be on a read-only
|
|
101
|
-
# filesystem.
|
|
102
|
-
- name: Install old Safari to home directory
|
|
103
|
-
if: matrix.os == 'macos-latest' && matrix.browser == 'Safari-old'
|
|
104
|
-
run: |
|
|
105
|
-
# Download Safari 15
|
|
106
|
-
# This URL discovered through the seed files listed at
|
|
107
|
-
# https://github.com/zhangyoufu/swscan.apple.com/blob/master/url.txt
|
|
108
|
-
curl -Lv http://swcdn.apple.com/content/downloads/42/33/012-57329-A_41P2VU6UHN/5fw5vna27fdw4mqfak5adj3pjpxvo9hgh7/Safari15.6.1CatalinaAuto.pkg > Safari.pkg
|
|
109
|
-
|
|
110
|
-
# Install older Safari to homedir specifically.
|
|
111
|
-
installer -pkg Safari.pkg -target CurrentUserHomeDirectory
|
|
112
|
-
|
|
113
|
-
# Install a launcher that can execute a shell script to launch this
|
|
114
|
-
npm install karma-script-launcher --save-dev
|
|
115
|
-
|
|
116
|
-
# When "Chrome for Testing" is installed on Mac or Windows, it gets
|
|
117
|
-
# invoked instead of simply "Chrome". This other copy of Chrome,
|
|
118
|
-
# however, doesn't seem to have basic codecs like AAC and H264 available,
|
|
119
|
-
# causing many of our test scenarios to fail. Deleting "Chrome for
|
|
120
|
-
# Testing" fixes this.
|
|
121
|
-
- name: 'Delete "Chrome for Testing" on Mac'
|
|
122
|
-
if: matrix.os == 'macos-latest' && matrix.browser == 'Chrome'
|
|
123
|
-
run: sudo rm -rf /Applications/Google\ Chrome\ for\ Testing.app
|
|
124
|
-
- name: 'Overwrite "Chrome for Testing" on Windows'
|
|
125
|
-
if: matrix.os == 'windows-latest' && matrix.browser == 'Chrome'
|
|
126
|
-
shell: bash
|
|
127
|
-
run: choco install -y googlechrome --ignore-checksums
|
|
128
|
-
|
|
129
|
-
# Some CI images (self-hosted or otherwise) don't have the minimum Java
|
|
130
|
-
# version necessary for the compiler (Java 11).
|
|
131
|
-
- uses: actions/setup-java@v3
|
|
132
|
-
with:
|
|
133
|
-
distribution: zulu
|
|
134
|
-
java-version: 11
|
|
135
|
-
|
|
136
|
-
- name: Build Player
|
|
137
|
-
run: python build/all.py
|
|
138
|
-
|
|
139
|
-
- name: Test Player
|
|
140
|
-
shell: bash
|
|
141
|
-
run: |
|
|
142
|
-
browser=${{ matrix.browser }}
|
|
143
|
-
|
|
144
|
-
if [[ "$browser" == "Safari-old" ]]; then
|
|
145
|
-
# Replace the browser name with a script that can launch this
|
|
146
|
-
# browser from the command line.
|
|
147
|
-
browser="$PWD/.github/workflows/safari-homedir-launcher.sh"
|
|
148
|
-
fi
|
|
149
|
-
|
|
150
|
-
python build/test.py \
|
|
151
|
-
--browsers "$browser" \
|
|
152
|
-
--reporters spec --spec-hide-passed \
|
|
153
|
-
${{ matrix.extra_flags }}
|
|
154
|
-
|
|
155
|
-
- name: Find coverage reports
|
|
156
|
-
id: coverage
|
|
157
|
-
if: always() # Even on failure of an earlier step.
|
|
158
|
-
shell: bash
|
|
159
|
-
run: |
|
|
160
|
-
# If the "coverage" directory exists...
|
|
161
|
-
if [ -d coverage ]; then
|
|
162
|
-
# Find the path to the coverage output folder. It includes the
|
|
163
|
-
# exact browser version in the path, so it will vary.
|
|
164
|
-
coverage_folder="$( (ls -d coverage/* || true) | head -1 )"
|
|
165
|
-
|
|
166
|
-
# Build a folder to stage all the coverage artifacts with
|
|
167
|
-
# predictable paths. The resulting zip file will not have any
|
|
168
|
-
# internal directories.
|
|
169
|
-
mkdir coverage/staging/
|
|
170
|
-
cp "$coverage_folder"/coverage.json coverage/staging/
|
|
171
|
-
cp "$coverage_folder"/coverage-details.json coverage/staging/
|
|
172
|
-
echo "${{ github.event.number }}" > coverage/staging/pr-number.json
|
|
173
|
-
|
|
174
|
-
echo "coverage_found=true" >> $GITHUB_OUTPUT
|
|
175
|
-
echo "Coverage report staged."
|
|
176
|
-
else
|
|
177
|
-
echo "No coverage report generated."
|
|
178
|
-
fi
|
|
179
|
-
|
|
180
|
-
- name: Upload coverage reports
|
|
181
|
-
uses: actions/upload-artifact@v3
|
|
182
|
-
if: ${{ always() && steps.coverage.outputs.coverage_found }}
|
|
183
|
-
with:
|
|
184
|
-
name: coverage
|
|
185
|
-
# This will create a download called coverage.zip containing all of
|
|
186
|
-
# these files, with no internal folders.
|
|
187
|
-
path: |
|
|
188
|
-
coverage/staging/coverage.json
|
|
189
|
-
coverage/staging/coverage-details.json
|
|
190
|
-
coverage/staging/pr-number.json
|
|
191
|
-
# Since we've already filtered this step for instances where there is
|
|
192
|
-
# an environment variable set, the file should definitely be there.
|
|
193
|
-
if-no-files-found: error
|
|
194
|
-
|
|
195
|
-
# Upload new screenshots and diffs on failure; ignore if missing
|
|
196
|
-
- name: Upload screenshots
|
|
197
|
-
uses: actions/upload-artifact@v3
|
|
198
|
-
if: ${{ failure() }}
|
|
199
|
-
with:
|
|
200
|
-
name: screenshots-${{ matrix.browser }}
|
|
201
|
-
path: |
|
|
202
|
-
test/test/assets/screenshots/*/*.png-new
|
|
203
|
-
test/test/assets/screenshots/*/*.png-diff
|
|
204
|
-
if-no-files-found: ignore
|
|
205
|
-
retention-days: 5
|
|
206
|
-
|
|
207
|
-
build_in_docker:
|
|
208
|
-
# Don't waste time doing a full matrix of test runs when there was an
|
|
209
|
-
# obvious linter error.
|
|
210
|
-
needs: lint
|
|
211
|
-
name: Docker
|
|
212
|
-
runs-on: ubuntu-latest
|
|
213
|
-
steps:
|
|
214
|
-
- name: Checkout code
|
|
215
|
-
uses: actions/checkout@v3
|
|
216
|
-
with:
|
|
217
|
-
ref: ${{ inputs.ref || github.ref }}
|
|
218
|
-
|
|
219
|
-
- name: Docker
|
|
220
|
-
run: |
|
|
221
|
-
docker build -t shaka-player-build build/docker
|
|
222
|
-
docker run -v $(pwd):/usr/src --user $(id -u):$(id -g) shaka-player-build
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2022 Google LLC
|
|
4
|
-
#
|
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
# you may not use this file except in compliance with the License.
|
|
7
|
-
# You may obtain a copy of the License at
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
# See the License for the specific language governing permissions and
|
|
15
|
-
# limitations under the License.
|
|
16
|
-
|
|
17
|
-
import argparse
|
|
18
|
-
import io
|
|
19
|
-
import json
|
|
20
|
-
import os
|
|
21
|
-
import re
|
|
22
|
-
import subprocess
|
|
23
|
-
import zipfile
|
|
24
|
-
|
|
25
|
-
# TODO(joeyparrish): Figure out how to get karma to output relative paths only.
|
|
26
|
-
def StripGitDir(path):
|
|
27
|
-
# Convert Windows-style paths to Unix-style paths so we can read coverage
|
|
28
|
-
# data from Windows runners, too.
|
|
29
|
-
path = path.replace('\\', '/')
|
|
30
|
-
# Strip the path to the git clone, leaving only the source path within the
|
|
31
|
-
# repo.
|
|
32
|
-
return re.sub(r'.*?/(lib|ui)/', r'\1/', path)
|
|
33
|
-
|
|
34
|
-
def RunCommand(args, text=True):
|
|
35
|
-
proc = subprocess.run(args, capture_output=True, text=text)
|
|
36
|
-
if proc.returncode != 0:
|
|
37
|
-
raise RuntimeError("Command failed:", args, proc.stdout, proc.stderr)
|
|
38
|
-
return proc.stdout
|
|
39
|
-
|
|
40
|
-
def GitHubApi(repo, path, text=True):
|
|
41
|
-
args = ["gh", "api", "/repos/%s/%s" % (repo, path)]
|
|
42
|
-
output = RunCommand(args, text)
|
|
43
|
-
if text:
|
|
44
|
-
return json.loads(output)
|
|
45
|
-
else:
|
|
46
|
-
return output
|
|
47
|
-
|
|
48
|
-
def GetCoverageArtifacts(repo, run_id):
|
|
49
|
-
# Fetch all artifacts from this run ID.
|
|
50
|
-
api_path = "actions/runs/%s/artifacts" % run_id
|
|
51
|
-
results = GitHubApi(repo, api_path)["artifacts"]
|
|
52
|
-
# Get the one that is named "coverage" (should be the only one).
|
|
53
|
-
artifact = list(filter(lambda x: x["name"] == "coverage", results))[0]
|
|
54
|
-
|
|
55
|
-
# Fetch and open the zip file containing the artifacts.
|
|
56
|
-
api_path = "actions/artifacts/%s/zip" % artifact["id"]
|
|
57
|
-
zip_data = GitHubApi(repo, api_path, text=False)
|
|
58
|
-
return zipfile.ZipFile(io.BytesIO(zip_data), 'r')
|
|
59
|
-
|
|
60
|
-
def CoverageLines(coverage_range):
|
|
61
|
-
start_line = coverage_range["start"]["line"]
|
|
62
|
-
end_line = coverage_range["end"]["line"]
|
|
63
|
-
|
|
64
|
-
lines = set()
|
|
65
|
-
for line in range(start_line, end_line + 1):
|
|
66
|
-
lines.add(line)
|
|
67
|
-
return lines
|
|
68
|
-
|
|
69
|
-
class CoverageDetails(object):
|
|
70
|
-
def __init__(self, file_data):
|
|
71
|
-
json_data = json.loads(file_data)
|
|
72
|
-
|
|
73
|
-
self.files = {}
|
|
74
|
-
|
|
75
|
-
# The structure is something like:
|
|
76
|
-
# {
|
|
77
|
-
# "/path/to/lib/player.js": {
|
|
78
|
-
# "statementMap": { ... },
|
|
79
|
-
# "fnMap": { ... },
|
|
80
|
-
# "s": { ... }
|
|
81
|
-
# }
|
|
82
|
-
# }
|
|
83
|
-
for path, path_data in json_data.items():
|
|
84
|
-
path = StripGitDir(path)
|
|
85
|
-
|
|
86
|
-
statement_to_lines = {}
|
|
87
|
-
instrumented_lines = set()
|
|
88
|
-
|
|
89
|
-
# The function map is a structure to map where each function is in a
|
|
90
|
-
# source file:
|
|
91
|
-
# {
|
|
92
|
-
# "0": {
|
|
93
|
-
# "loc": {
|
|
94
|
-
# "start": {
|
|
95
|
-
# "line": 7,
|
|
96
|
-
# "column": 0
|
|
97
|
-
# },
|
|
98
|
-
# "end": {
|
|
99
|
-
# "line": 8,
|
|
100
|
-
# "column": 29
|
|
101
|
-
# }
|
|
102
|
-
# }
|
|
103
|
-
# },
|
|
104
|
-
# ...
|
|
105
|
-
# }
|
|
106
|
-
# We extract function locations and remove them from statement spans
|
|
107
|
-
# below, so that we don't count (for example) class declaration statements
|
|
108
|
-
# as containing all the lines of every method in the class.
|
|
109
|
-
function_locations = []
|
|
110
|
-
for key, value in path_data["fnMap"].items():
|
|
111
|
-
lines = CoverageLines(value["loc"])
|
|
112
|
-
function_locations.append(lines)
|
|
113
|
-
|
|
114
|
-
# The statement map is a structure to map where each statement is in a
|
|
115
|
-
# source file:
|
|
116
|
-
# {
|
|
117
|
-
# "0": {
|
|
118
|
-
# "start": {
|
|
119
|
-
# "line": 7,
|
|
120
|
-
# "column": 0
|
|
121
|
-
# },
|
|
122
|
-
# "end": {
|
|
123
|
-
# "line": 8,
|
|
124
|
-
# "column": 29
|
|
125
|
-
# }
|
|
126
|
-
# },
|
|
127
|
-
# ...
|
|
128
|
-
# }
|
|
129
|
-
for key, value in path_data["statementMap"].items():
|
|
130
|
-
# All the lines of the statement, which may include other functions or
|
|
131
|
-
# statements.
|
|
132
|
-
lines = CoverageLines(value)
|
|
133
|
-
|
|
134
|
-
# Subtract from that the lines of any function that is a subset of
|
|
135
|
-
# these lines. By excluding entire methods before adding back their
|
|
136
|
-
# child statements, we exclude empty lines in class methods.
|
|
137
|
-
for function_lines in function_locations:
|
|
138
|
-
if function_lines < lines: # strict subset
|
|
139
|
-
lines -= function_lines # set subtraction
|
|
140
|
-
|
|
141
|
-
# If this statement is inside the range of another statement, remove
|
|
142
|
-
# this inner range from that outer one. This is important because loops
|
|
143
|
-
# and conditional statements contain their inner branches.
|
|
144
|
-
for older_key, older_lines in statement_to_lines.items():
|
|
145
|
-
# Check for a proper subset (lines contains all elements of
|
|
146
|
-
# child_lines, but child_lines is not an equal set).
|
|
147
|
-
if lines < older_lines: # strict subset
|
|
148
|
-
statement_to_lines[older_key] -= lines # set subtraction
|
|
149
|
-
|
|
150
|
-
statement_to_lines[key] = lines
|
|
151
|
-
|
|
152
|
-
# Whatever is left in any statement, we count as instrumented.
|
|
153
|
-
for key, lines in statement_to_lines.items():
|
|
154
|
-
for line in lines:
|
|
155
|
-
instrumented_lines.add(line)
|
|
156
|
-
|
|
157
|
-
# The "s" field is a map from statement numbers to number of times
|
|
158
|
-
# executed.
|
|
159
|
-
executed_lines = set()
|
|
160
|
-
for key, executed in path_data["s"].items():
|
|
161
|
-
if executed:
|
|
162
|
-
for line in statement_to_lines[key]:
|
|
163
|
-
executed_lines.add(line)
|
|
164
|
-
|
|
165
|
-
self.files[path] = {
|
|
166
|
-
"instrumented": instrumented_lines,
|
|
167
|
-
"executed": executed_lines,
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
class PullRequest(object):
|
|
171
|
-
def __init__(self, repo, number):
|
|
172
|
-
data = GitHubApi(repo, "pulls/%d" % number)
|
|
173
|
-
sha = data["merge_commit_sha"]
|
|
174
|
-
|
|
175
|
-
self.number = number
|
|
176
|
-
self.changes = {}
|
|
177
|
-
|
|
178
|
-
files = GitHubApi(repo, "commits/%s" % sha)["files"]
|
|
179
|
-
|
|
180
|
-
for file_data in files:
|
|
181
|
-
# The patch field is missing for binary files. Skip those.
|
|
182
|
-
if "patch" not in file_data:
|
|
183
|
-
continue
|
|
184
|
-
|
|
185
|
-
filename = file_data["filename"]
|
|
186
|
-
patch = file_data["patch"]
|
|
187
|
-
|
|
188
|
-
# Parse through the unified diff in "patch" to find the touched line
|
|
189
|
-
# numbers.
|
|
190
|
-
touched_lines = []
|
|
191
|
-
line_number = None
|
|
192
|
-
for line in patch.split("\n"):
|
|
193
|
-
if line[0] == "@":
|
|
194
|
-
# Turns a header like "@@ -749,7 +757,19 @@ foo" into line number 757.
|
|
195
|
-
# Note that the last part of the new file range could be omitted:
|
|
196
|
-
# "@@ -0,0 +1 @@ foo"
|
|
197
|
-
new_file_range = line.split("+")[1].split(" @@")[0]
|
|
198
|
-
line_number = int(new_file_range.split(",")[0])
|
|
199
|
-
elif line[0] == " ":
|
|
200
|
-
line_number += 1
|
|
201
|
-
elif line[0] == "+":
|
|
202
|
-
touched_lines.append(line_number)
|
|
203
|
-
line_number += 1
|
|
204
|
-
|
|
205
|
-
self.changes[filename] = touched_lines
|
|
206
|
-
|
|
207
|
-
def IncrementalCoverage(pr, coverage_details):
|
|
208
|
-
num_changed = 0
|
|
209
|
-
num_covered = 0
|
|
210
|
-
|
|
211
|
-
for path in pr.changes:
|
|
212
|
-
if path in coverage_details.files:
|
|
213
|
-
changed_lines = pr.changes[path]
|
|
214
|
-
instrumented_lines = coverage_details.files[path]["instrumented"]
|
|
215
|
-
executed_lines = coverage_details.files[path]["executed"]
|
|
216
|
-
|
|
217
|
-
for line in changed_lines:
|
|
218
|
-
# Only count the instrumented lines, not whitespace or comments.
|
|
219
|
-
if line in instrumented_lines:
|
|
220
|
-
num_changed += 1
|
|
221
|
-
if line in executed_lines:
|
|
222
|
-
num_covered += 1
|
|
223
|
-
|
|
224
|
-
if num_changed == 0:
|
|
225
|
-
return None
|
|
226
|
-
return num_covered / num_changed
|
|
227
|
-
|
|
228
|
-
def set_output(name, value):
|
|
229
|
-
path = os.environ.get("GITHUB_OUTPUT")
|
|
230
|
-
if path:
|
|
231
|
-
# Inside GitHub Actions, output the data to a special file GitHub provides.
|
|
232
|
-
with open(path, "a") as f:
|
|
233
|
-
f.write("{}={}\n".format(name, value))
|
|
234
|
-
else:
|
|
235
|
-
# Outside of GitHub Actions, just print the data.
|
|
236
|
-
print("OUTPUT {}={}".format(name, value))
|
|
237
|
-
|
|
238
|
-
def main():
|
|
239
|
-
parser = argparse.ArgumentParser(
|
|
240
|
-
description="Compute incremental code coverage for a PR",
|
|
241
|
-
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
|
242
|
-
parser.add_argument(
|
|
243
|
-
"--repo",
|
|
244
|
-
required=True,
|
|
245
|
-
help="The GitHub repo, such as shaka-project/shaka-player")
|
|
246
|
-
parser.add_argument(
|
|
247
|
-
"--run-id",
|
|
248
|
-
required=True,
|
|
249
|
-
help="The workflow run ID to download coverage data from")
|
|
250
|
-
args = parser.parse_args()
|
|
251
|
-
|
|
252
|
-
artifacts = GetCoverageArtifacts(args.repo, args.run_id)
|
|
253
|
-
coverage_details = CoverageDetails(artifacts.read("coverage-details.json"))
|
|
254
|
-
pr_number = json.loads(artifacts.read("pr-number.json"))
|
|
255
|
-
pr = PullRequest(args.repo, pr_number)
|
|
256
|
-
coverage = IncrementalCoverage(pr, coverage_details)
|
|
257
|
-
|
|
258
|
-
set_output("pr_number", str(pr_number))
|
|
259
|
-
if coverage is None:
|
|
260
|
-
set_output("coverage", "No instrumented code was changed.")
|
|
261
|
-
else:
|
|
262
|
-
set_output("coverage", "%.2f%%" % (coverage * 100.0))
|
|
263
|
-
|
|
264
|
-
if __name__ == "__main__":
|
|
265
|
-
main()
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
name: Prep Appspot Deployment
|
|
2
|
-
|
|
3
|
-
description: |
|
|
4
|
-
A reusable action that prepares the sources to deploy the Shaka Player Demo
|
|
5
|
-
to appspot. Assumes that the source is already checked out.
|
|
6
|
-
|
|
7
|
-
runs:
|
|
8
|
-
using: composite
|
|
9
|
-
steps:
|
|
10
|
-
- name: Install dependencies
|
|
11
|
-
shell: bash
|
|
12
|
-
run: npm ci
|
|
13
|
-
|
|
14
|
-
- name: Build Shaka Player
|
|
15
|
-
shell: bash
|
|
16
|
-
run: python build/all.py
|
|
17
|
-
|
|
18
|
-
- name: Extract git version
|
|
19
|
-
shell: bash
|
|
20
|
-
run: |
|
|
21
|
-
(
|
|
22
|
-
cd build
|
|
23
|
-
python3 -c 'from shakaBuildHelpers import git_version; print(git_version())'
|
|
24
|
-
) > demo-version
|
|
25
|
-
|
|
26
|
-
- name: Tag the Player version
|
|
27
|
-
shell: bash
|
|
28
|
-
run: |
|
|
29
|
-
DEMO_VERSION="$(cat demo-version)-uncompiled"
|
|
30
|
-
sed \
|
|
31
|
-
-i lib/player.js \
|
|
32
|
-
-e "s/\(shaka.Player.version\) = .*/\1 = '$DEMO_VERSION';/"
|
|
33
|
-
rm demo-version
|
|
34
|
-
|
|
35
|
-
- name: Backup demo node modules
|
|
36
|
-
shell: bash
|
|
37
|
-
run: |
|
|
38
|
-
DEMO_NODE_MODULES=$(jq -r .shakaCustom.demoDeps[] package.json)
|
|
39
|
-
tar cf demo-modules.tar \
|
|
40
|
-
$(echo "$DEMO_NODE_MODULES" | sed -e 's@^@node_modules/@')
|
|
41
|
-
|
|
42
|
-
- name: Delete unneeded files
|
|
43
|
-
shell: bash
|
|
44
|
-
run: rm -rf .git .github build externs test node_modules
|
|
45
|
-
|
|
46
|
-
- name: Restore demo node modules
|
|
47
|
-
shell: bash
|
|
48
|
-
run: |
|
|
49
|
-
tar xf demo-modules.tar
|
|
50
|
-
rm demo-modules.tar
|
|
51
|
-
|
|
52
|
-
- name: Install App Engine code
|
|
53
|
-
shell: bash
|
|
54
|
-
run: |
|
|
55
|
-
mv app-engine/shaka-player-demo/* .
|
|
56
|
-
rm README.md
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Set Commit Status
|
|
2
|
-
|
|
3
|
-
description: |
|
|
4
|
-
A reusable action that sets the commit status. This is used to set PR status
|
|
5
|
-
from workflows with non-PR triggers (such as manually-triggered workflows).
|
|
6
|
-
|
|
7
|
-
inputs:
|
|
8
|
-
context:
|
|
9
|
-
description: An arbitrary string to identify the status check.
|
|
10
|
-
required: true
|
|
11
|
-
state:
|
|
12
|
-
description: Either "pending", "error", "success", or "failure".
|
|
13
|
-
required: true
|
|
14
|
-
token:
|
|
15
|
-
description: A GitHub access token.
|
|
16
|
-
required: true
|
|
17
|
-
|
|
18
|
-
runs:
|
|
19
|
-
using: composite
|
|
20
|
-
steps:
|
|
21
|
-
- name: Report Commit Status
|
|
22
|
-
shell: bash
|
|
23
|
-
run: |
|
|
24
|
-
# This is the URL to view this workflow run on GitHub. It will be
|
|
25
|
-
# attached to the commit status, so that when someone clicks "details"
|
|
26
|
-
# next to the status on the PR, it will link to this run where they can
|
|
27
|
-
# see the logs.
|
|
28
|
-
RUN_URL="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
|
|
29
|
-
SHA1=$(git rev-parse HEAD)
|
|
30
|
-
|
|
31
|
-
GITHUB_TOKEN=${{ inputs.token }} \
|
|
32
|
-
gh api \
|
|
33
|
-
-X POST \
|
|
34
|
-
-F "context=${{ inputs.context }}" \
|
|
35
|
-
-F "state=${{ inputs.state }}" \
|
|
36
|
-
-F "target_url=$RUN_URL" \
|
|
37
|
-
"repos/${{ github.repository }}/statuses/$SHA1"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: Deflake Tests
|
|
2
|
-
|
|
3
|
-
# Runs when the Selenum lab test or PR test workflows complete. This will run
|
|
4
|
-
# with full privileges, even if the other workflow doesn't. That allows us to
|
|
5
|
-
# trigger re-runs if we think the results might be flaky. A test run will be
|
|
6
|
-
# given up to 3 runs to succeed.
|
|
7
|
-
on:
|
|
8
|
-
workflow_run:
|
|
9
|
-
workflows:
|
|
10
|
-
- Selenium Lab Tests
|
|
11
|
-
- Build and Test PR
|
|
12
|
-
types: [completed]
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
deflake:
|
|
16
|
-
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Check run count and re-run workflow
|
|
21
|
-
env:
|
|
22
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
-
run: |
|
|
24
|
-
gh api /repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }} > run.json
|
|
25
|
-
RUNS=$(jq -r .run_attempt < run.json)
|
|
26
|
-
if [[ "$RUNS" -lt 3 ]]; then
|
|
27
|
-
echo "$RUNS failed runs so far; re-running workflow."
|
|
28
|
-
gh run rerun ${{ github.event.workflow_run.id }} --failed -R ${{ github.repository }}
|
|
29
|
-
else
|
|
30
|
-
echo "$RUNS failed runs so far; not re-running workflow."
|
|
31
|
-
fi
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
name: Deploy Demo Version Index
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
# Allows for manual triggering.
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
paths:
|
|
10
|
-
- .github/workflows/demo-version-index.yaml
|
|
11
|
-
- app-engine/demo-version-index/**
|
|
12
|
-
release:
|
|
13
|
-
types: [published]
|
|
14
|
-
# NOTE: So long as releases are made without a personal access token (PAT),
|
|
15
|
-
# they will not activate this workflow's release trigger. For now, the
|
|
16
|
-
# schedule trigger will compensate for that by updating the index nightly.
|
|
17
|
-
schedule:
|
|
18
|
-
# Run every night at 10pm PST / 6am UTC.
|
|
19
|
-
- cron: '0 6 * * *'
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
appspot:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v3
|
|
26
|
-
with:
|
|
27
|
-
# We need a list of all tags for this, so fetch the entire history.
|
|
28
|
-
fetch-depth: 0
|
|
29
|
-
|
|
30
|
-
- uses: google-github-actions/auth@v0
|
|
31
|
-
with:
|
|
32
|
-
credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
|
|
33
|
-
|
|
34
|
-
- name: Generate static content
|
|
35
|
-
run: python3 app-engine/demo-version-index/generate.py
|
|
36
|
-
|
|
37
|
-
- uses: google-github-actions/deploy-appengine@v0
|
|
38
|
-
with:
|
|
39
|
-
project_id: shaka-player-demo
|
|
40
|
-
version: index
|
|
41
|
-
working_directory: app-engine/demo-version-index/
|
|
42
|
-
promote: false
|
|
43
|
-
|