From fe81d68a509de807d26062e466da5c96cdb9b45e Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 23 Jul 2024 15:14:33 -0700 Subject: [PATCH] Remove action --- .github/actions/live-test/action.yml | 19 ------------------- .github/workflows/live-test.yml | 13 ++++++++----- .github/workflows/main.yml | 13 +++++++------ .github/workflows/release.yml | 10 +++++++--- 4 files changed, 22 insertions(+), 33 deletions(-) delete mode 100644 .github/actions/live-test/action.yml diff --git a/.github/actions/live-test/action.yml b/.github/actions/live-test/action.yml deleted file mode 100644 index bde2139b..00000000 --- a/.github/actions/live-test/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Live Test -description: 'Run live tests against the OpenAI API' -inputs: - openai_api_key: - description: 'API key for the OpenAI API' - required: true -runs: - using: 'composite' - steps: - - name: Run Live Tests - shell: pwsh - run: dotnet test - --configuration Release - --filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual" - --logger "trx;LogFilePrefix=live" - --results-directory ${{github.workspace}}/artifacts/test-results - env: - OPENAI_API_KEY: ${{ github.event.inputs.openai_api_key }} - diff --git a/.github/workflows/live-test.yml b/.github/workflows/live-test.yml index ee2f9dcf..ba922546 100644 --- a/.github/workflows/live-test.yml +++ b/.github/workflows/live-test.yml @@ -5,7 +5,6 @@ on: inputs: ref: description: 'Committish to checkout and test' - required: true jobs: test: @@ -21,12 +20,16 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: ${{ github.event.inputs.ref }} + ref: ${{ github.event.inputs.ref || github.sha }} - name: Run Live Tests - uses: ./.github/actions/live-test - with: - openai_api_key: ${{ secrets.OPENAI_API_KEY }} + run: dotnet test + --configuration Release + --filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual" + --logger "trx;LogFilePrefix=live" + --results-directory ${{github.workspace}}/artifacts/test-results + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Upload artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5a5c6a58..f38ad3a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,9 +2,6 @@ name: Build and Test on: workflow_dispatch: - inputs: - commit_sha: - description: 'Commit SHA to checkout and test' push: branches: - main @@ -62,9 +59,13 @@ jobs: uses: actions/checkout@v2 - name: Run Live Tests - uses: ./.github/actions/live-test - with: - openai_api_key: ${{ secrets.OPENAI_API_KEY }} + run: dotnet test + --configuration Release + --filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual" + --logger "trx;LogFilePrefix=live" + --results-directory ${{github.workspace}}/artifacts/test-results + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Upload artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8074d696..a51eef2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,9 +33,13 @@ jobs: --logger "trx;LogFileName=${{github.workspace}}/artifacts/test-results/smoke.trx" - name: Run Live Tests - uses: ./.github/actions/live-test - with: - openai_api_key: ${{ secrets.OPENAI_API_KEY }} + run: dotnet test + --configuration Release + --filter="TestCategory!=Smoke&TestCategory!=Images&TestCategory!=Moderations&TestCategory!=Manual" + --logger "trx;LogFilePrefix=live" + --results-directory ${{github.workspace}}/artifacts/test-results + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Upload artifact uses: actions/upload-artifact@v2