diff --git a/.build/travis-ffmpeg-config.js b/.build/travis-ffmpeg-config.js deleted file mode 100644 index bcfe8ea..0000000 --- a/.build/travis-ffmpeg-config.js +++ /dev/null @@ -1,14 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const CONFIG_PATH = path.resolve('./FFMpegCore.Test/ffmpeg.config.json'); - -console.log('--- Configuring ffmpeg binary path for:', process.env.TRAVIS_OS_NAME); - -let data = require(CONFIG_PATH); - -data.RootDirectory = process.env.TRAVIS_OS_NAME === 'linux' ? - '/usr/bin' : - '/usr/local/bin'; - -fs.writeFileSync(CONFIG_PATH, JSON.stringify(data, null, 4)); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a49128..bf58e95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push, pull_request] +on: pull_request jobs: build: runs-on: ubuntu-latest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1cb2185..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: csharp -mono: none -dotnet: 3.1 -os: - - linux - - osx -dist: trusty -before_install: - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:mc3man/trusty-media; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y ffmpeg libgdiplus; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ffmpeg mono-libgdiplus; fi - - ffmpeg -hwaccels -script: - - nvm install --lts - - nvm use --lts - - node ./.build/travis-ffmpeg-config.js - - dotnet restore - - dotnet build ./FFMpegCore/ - - dotnet test ./FFMpegCore.Test/ -branches: - only: - - master - - /fix\/.+/ - - /feature\/.+/ diff --git a/FFMpegCore.Test/VideoTest.cs b/FFMpegCore.Test/VideoTest.cs index ec781aa..702a557 100644 --- a/FFMpegCore.Test/VideoTest.cs +++ b/FFMpegCore.Test/VideoTest.cs @@ -318,10 +318,10 @@ public void Video_Join_Image_Sequence() public void Video_With_Only_Audio_Should_Extract_Metadata() { var video = VideoInfo.FromFileInfo(VideoLibrary.LocalVideoAudioOnly); - Assert.AreEqual(video.VideoFormat, "none"); - Assert.AreEqual(video.AudioFormat, "aac"); - Assert.AreEqual(video.Duration.TotalSeconds, 79.451); - Assert.AreEqual(video.Size, 1.25); + Assert.AreEqual("none", video.VideoFormat); + Assert.AreEqual("aac", video.AudioFormat); + Assert.AreEqual(79.0, video.Duration.TotalSeconds, 0.1); + Assert.AreEqual(1.25, video.Size); } [TestMethod] diff --git a/FFMpegCore.Test/ffmpeg.config.json b/FFMpegCore.Test/ffmpeg.config.json index b9c9a56..d80b26e 100644 --- a/FFMpegCore.Test/ffmpeg.config.json +++ b/FFMpegCore.Test/ffmpeg.config.json @@ -1,3 +1,3 @@ { - "RootDirectory": "" + "RootDirectory": "/usr/bin" } \ No newline at end of file diff --git a/README.md b/README.md index 0c87ad1..6fddd05 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FFMpegCore [![NuGet Badge](https://buildstats.info/nuget/FFMpegCore)](https://www.nuget.org/packages/FFMpegCore/) -[![Build Status](https://travis-ci.org/rosenbjerg/FFMpegCore.svg)](https://travis-ci.org/vladjerca/FFMpegCore) +![CI](https://github.com/rosenbjerg/FFMpegCore/workflows/CI/badge.svg) # Setup