Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch from travis to github actions for ci #989

Merged
merged 4 commits into from
Nov 10, 2020
Merged

chore: switch from travis to github actions for ci #989

merged 4 commits into from
Nov 10, 2020

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Nov 4, 2020

This switches our code to be tested on github actions as travis ci has become unreasonably slow.

Depends upon videojs/videojs-generate-karma-config#37

The tests for this pull request are run in a forked branch to show that they can work for a fork. To see local tests using browserstack see https://github.com/videojs/http-streaming/runs/1360756885?check_suite_focus=true

test/playback.test.js Outdated Show resolved Hide resolved
@@ -19,7 +19,7 @@ const playFor = function(player, time, cb) {

const checkPlayerTime = function() {
window.setTimeout(() => {
if (player.currentTime() <= targetTime) {
if (player.tech_ && player.tech_.el_ && player.currentTime() <= targetTime) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents an error from being logged when this functoin runs after the player has disposed on a test timeout.

@brandonocasey brandonocasey changed the title Testing GitHub ci with a fork chore: switch from travis to github actions for ci Nov 4, 2020
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that in the future it will be possible for us to test on windows and drop browserstack entirely. Not that I hate browserstack but it would allow us to unify testing in pull requests and pushes. Just have to drop ie 11 support...

.nvmrc Show resolved Hide resolved
Comment on lines 44 to 54
# run safari, chrome, firefox on macos
- name: Run Mac test
run: npm run test
if: ${{ startsWith(matrix.os, 'macos') }}

# only run ie 11 on windows
- name: Run Windows test
run: npm run test
if: ${{ startsWith(matrix.os, 'windows') }}

# run chrome/firefox in linux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to run these in parallel?
Though, we can do that as a followup too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, currently we're only running on linux for BS?
I'm OK with making these updates as a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all os steps run in parallel yeah, we are only running bs on linux

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are actually only running on linux right now period for everything, as windows/mac are not included in the os matrix list at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, yeah, wasn't sure whether the matrix items run in parallel or not.

.nvmrc Show resolved Hide resolved
gkatsev added a commit to videojs/.github that referenced this pull request Nov 9, 2020
@@ -1 +1 @@
lts/dubnium
10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was switched to a number because actions/setup-node requires a number and can't use lts/dubnium. While I still like the signal that we use lts here, having a single source of truth for the node version we're on is nice.

@brandonocasey brandonocasey merged commit c9b195b into videojs:main Nov 10, 2020
gkatsev added a commit to videojs/.github that referenced this pull request Nov 10, 2020
More updates from videojs/http-streaming#989.
Makes it actually ready for usage now.

As the description says, it requires videojs-generate-karma-config@7 and
newer, karma@5, and a number in the nvmrc file.

We read the nvmrc to know the version to use in the CI action and it can
only use a number directly. Having a single source of truth is better
than having a signal that we're on an lts version.
@brandonocasey brandonocasey deleted the bc-test-github-ci branch November 19, 2020 21:42
evanfarina pushed a commit to evanfarina/http-streaming that referenced this pull request Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants