diff --git a/.github/workflows/post-merge.yaml b/.github/workflows/post-merge.yaml new file mode 100644 index 00000000..bdb6c9b8 --- /dev/null +++ b/.github/workflows/post-merge.yaml @@ -0,0 +1,45 @@ +name: Push Coverage Post Merge + +# Controls when the action will run. +on: + # Triggers the workflow on pull request events but only for the main branch + push: + branches: + - main + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "test" + test: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] # can support multiple versions ex: [18.x, 20.x] + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v4 + - name: Setup โš™๏ธ Node.js ${{ matrix.node-version }} ๐Ÿ”ฐ + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install Dependencies ๐Ÿฅ + run: yarn install --frozen-lockfile + + - name: Run unit tests ๐Ÿงช + run: yarn coverage --silent --ci --verbose=false + env: + CI: true + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + fail_ci_if_error: true diff --git a/.tekton/konflux-ui-pull-request.yaml b/.tekton/konflux-ui-pull-request.yaml index 7ff65ad2..d92facc9 100644 --- a/.tekton/konflux-ui-pull-request.yaml +++ b/.tekton/konflux-ui-pull-request.yaml @@ -390,40 +390,35 @@ spec: operator: in values: - "false" - - name: sbom-json-check + - name: apply-tags params: - - name: IMAGE_URL + - name: IMAGE value: $(tasks.build-container.results.IMAGE_URL) - - name: IMAGE_DIGEST - value: $(tasks.build-container.results.IMAGE_DIGEST) runAfter: - build-container taskRef: params: - name: name - value: sbom-json-check + value: apply-tags - name: bundle - value: quay.io/konflux-ci/tekton-catalog/task-sbom-json-check:0.2@sha256:f3f441de3002c5654acdff0553fd54cb1409e6bef6ff68e514d1731c9688b5cc + value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:87fd7fc0e937aad1a8db9b6e377d7e444f53394dafde512d68adbea6966a4702 - name: kind value: task resolver: bundles - when: - - input: $(params.skip-checks) - operator: in - values: - - "false" - - name: apply-tags + - name: rpms-signature-scan params: - - name: IMAGE + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url value: $(tasks.build-container.results.IMAGE_URL) runAfter: - build-container taskRef: params: - name: name - value: apply-tags + value: rpms-signature-scan - name: bundle - value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:87fd7fc0e937aad1a8db9b6e377d7e444f53394dafde512d68adbea6966a4702 + value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:7aa4d3c95e2b963e82fdda392f7cb3d61e3dab035416cf4a3a34e43cf3c9c9b8 - name: kind value: task resolver: bundles diff --git a/.tekton/konflux-ui-push.yaml b/.tekton/konflux-ui-push.yaml index 1c32099d..9cde796d 100644 --- a/.tekton/konflux-ui-push.yaml +++ b/.tekton/konflux-ui-push.yaml @@ -387,40 +387,35 @@ spec: operator: in values: - "false" - - name: sbom-json-check + - name: apply-tags params: - - name: IMAGE_URL + - name: IMAGE value: $(tasks.build-container.results.IMAGE_URL) - - name: IMAGE_DIGEST - value: $(tasks.build-container.results.IMAGE_DIGEST) runAfter: - build-container taskRef: params: - name: name - value: sbom-json-check + value: apply-tags - name: bundle - value: quay.io/konflux-ci/tekton-catalog/task-sbom-json-check:0.2@sha256:f3f441de3002c5654acdff0553fd54cb1409e6bef6ff68e514d1731c9688b5cc + value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:87fd7fc0e937aad1a8db9b6e377d7e444f53394dafde512d68adbea6966a4702 - name: kind value: task resolver: bundles - when: - - input: $(params.skip-checks) - operator: in - values: - - "false" - - name: apply-tags + - name: rpms-signature-scan params: - - name: IMAGE + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url value: $(tasks.build-container.results.IMAGE_URL) runAfter: - build-container taskRef: params: - name: name - value: apply-tags + value: rpms-signature-scan - name: bundle - value: quay.io/konflux-ci/tekton-catalog/task-apply-tags:0.1@sha256:87fd7fc0e937aad1a8db9b6e377d7e444f53394dafde512d68adbea6966a4702 + value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:7aa4d3c95e2b963e82fdda392f7cb3d61e3dab035416cf4a3a34e43cf3c9c9b8 - name: kind value: task resolver: bundles