diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66cb15d..a5d5510 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,9 @@ jobs: run: dotnet build -c Release -v minimal --no-restore AITSYS.Vimeo.Ott.sln - name: Test library run: dotnet test -v minimal -c Release --no-restore --no-build AITSYS.Vimeo.Ott.sln + env: + VIMEO_TEST_TOKEN: ${{ secrets.VIMEO_TEST_TOKEN }} + VIMEO_TEST_USER: ${{ secrets.VIMEO_TEST_USER }} pack: timeout-minutes: 15 runs-on: ubuntu-latest diff --git a/AITSYS.Vimeo.Ott.Test/AITSYS.Vimeo.Ott.Test.csproj b/AITSYS.Vimeo.Ott.Test/AITSYS.Vimeo.Ott.Test.csproj index 810d813..2f25b10 100644 --- a/AITSYS.Vimeo.Ott.Test/AITSYS.Vimeo.Ott.Test.csproj +++ b/AITSYS.Vimeo.Ott.Test/AITSYS.Vimeo.Ott.Test.csproj @@ -7,13 +7,13 @@ enable false 1551d531-5ba6-4604-999c-3207f33a9fce - true - false - true - true - false - false - 1591;NU5128;DV2001;CS0271;CS0414 + true + false + true + true + false + false + 1591;NU5128;DV2001;CS0271;CS0414 diff --git a/AITSYS.Vimeo.Ott.Test/UnitTest1.cs b/AITSYS.Vimeo.Ott.Test/UnitTest1.cs index a99e8b8..82fc762 100644 --- a/AITSYS.Vimeo.Ott.Test/UnitTest1.cs +++ b/AITSYS.Vimeo.Ott.Test/UnitTest1.cs @@ -23,12 +23,12 @@ public void Setup() .Build(); this.VimeoClient = new(new() { - ApiKey = config["token"], + ApiKey = config["token"] ?? Environment.GetEnvironmentVariable("VIMEO_TEST_TOKEN"), MinimumLogLevel = LogLevel.Debug /*, Proxy = new WebProxy("127.0.0.1:8000")*/ }); - this.UserId = Convert.ToInt32(config["user_id"]); + this.UserId = Convert.ToInt32(config["user_id"] ?? Environment.GetEnvironmentVariable("VIMEO_TEST_USER")); this.CustomerVimeoClient = this.VimeoClient.GetClientForCustomer($"https://api.vhx.tv/customers/{this.UserId}"); }