Skip to content

Commit

Permalink
Switch codecov uploads to use OIDC as tokenless is no-longer supported (
Browse files Browse the repository at this point in the history
#276)

* Switch codecov uploads to use OIDC as tokenless is no-longer supported

Signed-off-by: Thomas Farr <[email protected]>

* Only try to create scheduled test failure issues on main repo

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: Thomas Farr <[email protected]>
(cherry picked from commit 4528640)
  • Loading branch information
Xtansia authored and github-actions[bot] committed Aug 28, 2024
1 parent 2f5e8be commit 14b533b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
schedule:
- cron: '0 8 * * *'

permissions:
id-token: write
contents: read

jobs:
test:
name: Test
Expand Down Expand Up @@ -55,6 +59,7 @@ jobs:
with:
files: ./test_results/opensearch.lcov
flags: unit
use_oidc: true

- name: Save OpenSearch logs
if: failure()
Expand Down Expand Up @@ -112,6 +117,7 @@ jobs:
with:
files: ./client/test_results/opensearch.lcov
flags: integration
use_oidc: true

- name: Save OpenSearch logs
if: failure()
Expand All @@ -135,7 +141,7 @@ jobs:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' && github.repository == 'opensearch-project/opensearch-rs'
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
Expand Down Expand Up @@ -203,9 +209,11 @@ jobs:
OPENSEARCH_PASSWORD: ${{ steps.opensearch.outputs.admin_password }}

- uses: codecov/codecov-action@v4
if: github.event_name != 'schedule'
with:
files: ./client/test_results/opensearch.lcov
flags: integration
use_oidc: true

- name: Save OpenSearch logs
if: failure()
Expand All @@ -216,7 +224,7 @@ jobs:
opensearch-*/logs/*
- name: Create issue about failure
if: failure() && github.event_name == 'schedule'
if: failure() && github.event_name == 'schedule' && github.repository == 'opensearch-project/opensearch-rs'
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token }}
Expand Down

0 comments on commit 14b533b

Please sign in to comment.