From 9cbcd45dd7ad5c491234f53c88a4fa0cde8234db Mon Sep 17 00:00:00 2001 From: Zack Kayyali Date: Tue, 27 Aug 2024 15:27:24 -0400 Subject: [PATCH] fix: refactor vars --- .github/actions/all-tests/action.yml | 12 ++++++++++-- .github/actions/common-tests/action.yml | 4 ++-- .github/actions/e2e-tests/action.yml | 4 ++-- .github/workflows/ci.yml | 4 ++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/actions/all-tests/action.yml b/.github/actions/all-tests/action.yml index 1911e5b6..1bfe547f 100644 --- a/.github/actions/all-tests/action.yml +++ b/.github/actions/all-tests/action.yml @@ -10,6 +10,10 @@ runs: echo "GIT_SHA=$(git rev-parse "$GITHUB_SHA")" >> "$GITHUB_ENV" - name: Common tests + env: + TEST_RESULTS_AGGREGATOR_USERNAME: ${{ env.TEST_RESULTS_AGGREGATOR_USERNAME }} + TEST_RESULTS_AGGREGATOR_PASSWORD: ${{ env.TEST_RESULTS_AGGREGATOR_PASSWORD }} + TEST_RESULTS_AGGREGATOR_URL: ${{ env.TEST_RESULTS_AGGREGATOR_URL }} uses: ./.github/actions/common-tests - name: Long-running tests @@ -20,12 +24,16 @@ runs: shell: bash run: >- http --check-status --ignore-stdin - --auth "${{ vars.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ secrets.TEST_RESULTS_AGGREGATOR_PASSWORD }}" - -f POST "${{ vars.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" + --auth "${{ env.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ env.TEST_RESULTS_AGGREGATOR_PASSWORD }}" + -f POST "${{ env.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" xunit_xml@long-running-test-results.xml component_name=eda git_commit_sha=${{ env.GIT_SHA }} git_repository_url="https://github.com/${{ github.repository }}" - name: e2e tests + env: + TEST_RESULTS_AGGREGATOR_USERNAME: ${{ env.TEST_RESULTS_AGGREGATOR_USERNAME }} + TEST_RESULTS_AGGREGATOR_PASSWORD: ${{ env.TEST_RESULTS_AGGREGATOR_PASSWORD }} + TEST_RESULTS_AGGREGATOR_URL: ${{ env.TEST_RESULTS_AGGREGATOR_URL }} uses: ./.github/actions/e2e-tests diff --git a/.github/actions/common-tests/action.yml b/.github/actions/common-tests/action.yml index 7b13b68e..f9c1812f 100644 --- a/.github/actions/common-tests/action.yml +++ b/.github/actions/common-tests/action.yml @@ -17,8 +17,8 @@ runs: shell: bash run: >- http --check-status --ignore-stdin - --auth "${{ vars.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ secrets.TEST_RESULTS_AGGREGATOR_PASSWORD }}" - -f POST "${{ vars.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" + --auth "${{ env.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ env.TEST_RESULTS_AGGREGATOR_PASSWORD }}" + -f POST "${{ env.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" xunit_xml@common-test-results.xml component_name=eda git_commit_sha=${{ env.GIT_SHA }} diff --git a/.github/actions/e2e-tests/action.yml b/.github/actions/e2e-tests/action.yml index 487ac50c..7aa0ed22 100644 --- a/.github/actions/e2e-tests/action.yml +++ b/.github/actions/e2e-tests/action.yml @@ -17,8 +17,8 @@ runs: shell: bash run: >- http --check-status --ignore-stdin - --auth "${{ vars.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ secrets.TEST_RESULTS_AGGREGATOR_PASSWORD }}" - -f POST "${{ vars.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" + --auth "${{ env.TEST_RESULTS_AGGREGATOR_USERNAME }}:${{ env.TEST_RESULTS_AGGREGATOR_PASSWORD }}" + -f POST "${{ env.TEST_RESULTS_AGGREGATOR_URL }}/api/results/upload/" xunit_xml@e2e-test-results.xml component_name=eda git_commit_sha=${{ env.GIT_SHA }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 438755aa..849949b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: All tests + env: + TEST_RESULTS_AGGREGATOR_USERNAME: ${{ vars.TEST_RESULTS_AGGREGATOR_USERNAME }} + TEST_RESULTS_AGGREGATOR_PASSWORD: ${{ secrets.TEST_RESULTS_AGGREGATOR_PASSWORD }} + TEST_RESULTS_AGGREGATOR_URL: ${{ vars.TEST_RESULTS_AGGREGATOR_URL }} uses: ./.github/actions/all-tests - name: Upload coverage to Codecov