Skip to content

Commit

Permalink
add test workflow (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchg authored Jul 5, 2023
1 parent 47432cb commit 10de04f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test-reports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Test Report'
on:
workflow_run:
workflows: ['Test'] # runs after CI workflow
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results # artifact name
name: JEST Tests # Name of the check run which will be created
path: '*.xml' # Path to test results (inside artifact .zip)
reporter: jest-junit # Format of test results
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test
on:
pull_request:

env:
KUBECONFIG: "/home/gh-action/.kcli/clusters/ocp-test/auth/kubeconfig"

jobs:
scorecard:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build bundle
run: make bundle
- name: Run scorecard tests
run: operator-sdk scorecard ./bundle -o xunit > scorecard-tests.xml
- uses: actions/upload-artifact@v2 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: scorecard-tests.xml

0 comments on commit 10de04f

Please sign in to comment.