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 # Cancel in-progress runs when new commits are pushed to main concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true # 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 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout ๐Ÿ›Ž๏ธ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Enable Corepack ๐Ÿ“ฆ run: corepack enable - name: Setup โš™๏ธ Node.js ๐Ÿ”ฐ uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 24.x cache: 'yarn' - name: Install Dependencies ๐Ÿฅ run: yarn install --immutable - name: Run unit tests ๐Ÿงช run: yarn coverage --silent --ci --verbose=false env: CI: true - name: Upload coverage to Codecov uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 with: files: ./coverage/lcov.info token: ${{ secrets.CODECOV_TOKEN }} flags: unittests fail_ci_if_error: true push-test-image: runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž๏ธ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build E2E Test Image env: QUAY_BOT_TOKEN: ${{ secrets.QUAY_BOT_TOKEN }} QUAY_BOT_USERNAME: ${{ secrets.QUAY_BOT_USERNAME }} run: | podman login -u="$QUAY_BOT_USERNAME" -p="$QUAY_BOT_TOKEN" quay.io TAG="latest" if [ "${{ github.ref }}" != "refs/heads/main" ]; then TAG="${GITHUB_REF_NAME}" fi TEST_IMAGE="quay.io/konflux_ui_qe/konflux-ui-tests:${TAG}" cd e2e-tests podman build -t ${TEST_IMAGE} -f Containerfile echo "Image ${TEST_IMAGE} successfully built. Pushing the image." podman push ${TEST_IMAGE}