Skip to content

test: isolate unit test files from each other #2374

test: isolate unit test files from each other

test: isolate unit test files from each other #2374

name: Pull Request - Update
# CI flow for pull requests: QA, build, and deploy preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
permissions:
contents: read
id-token: write # required for _qa.yaml (QLTY code coverage)
packages: write # required for pushing to ghcr.io
env:
BUILD_NAME: pr-${{ github.event.number }}
jobs:
qa:
uses: ./.github/workflows/_qa-unit.yaml
secrets: inherit
with:
is-fork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
# e2e runs on every PR push without screenshots (no ARGOS_TOKEN passed).
# Argos visual regression is opt-in via the 'Final Review' label
# (see label-triggered-review.yml).
qa-e2e:
uses: ./.github/workflows/_qa-e2e.yaml
with:
is-fork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
build:
uses: ./.github/workflows/_build.yaml
secrets: inherit
with:
build_name: pr-${{ github.event.number }}
docker_tags: type=ref,event=pr
skip-image: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
deploy:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
needs:
- build
steps:
- name: Deploy updated image
uses: appleboy/ssh-action@823bd89e131d8d508129f9443cad5855e9ba96f0 # v1.2.4
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd /var/docker/pr-${{ github.event.number }}
docker compose pull
docker compose up -d