Skip to content

Commit

Permalink
Fix issues in the workflow simplifications of #1054 (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb authored Mar 29, 2023
1 parent eda819b commit 6c83452
Showing 1 changed file with 45 additions and 5 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,26 @@ jobs:
name: openverse-api-openapi-schema.yaml
path: ./api/openapi.yaml

# This job runs when `django-checks` doesn't and always passes, thus allowing
# PRs to meet the required checks criteria and be merged.
bypass-django-checks:
name: Run Django checks
if: needs.get-changes.outputs.api != 'true'
runs-on: ubuntu-latest
needs:
- get-changes
strategy:
matrix:
recipe:
- "api/dj check"
- "api/dj validateopenapischema"
- "api/dj makemigrations --check --noinput --merge"
- "api/doc-test"

steps:
- name: Pass
run: echo 'Django checks are skipped because API is unchanged.'

############
# Frontend #
############
Expand Down Expand Up @@ -492,6 +512,25 @@ jobs:
name: ${{ matrix.name }}_test_results
path: frontend/test-results

# This job runs when `playwright` doesn't and always passes, thus allowing
# PRs to meet the required checks criteria and be merged.
bypass-playwright:
name: Run Playwright tests
if: needs.get-changes.outputs.frontend != 'true'
runs-on: ubuntu-latest
needs:
- get-changes
strategy:
matrix:
name:
- playwright_vr
- playwright_e2e
- storybook_vr

steps:
- name: Pass
run: echo 'Playwright tests are skipped because frontend is unchanged.'

playwright-test-failure-comment:
name: Post Playwright test debugging instructions
if: |
Expand Down Expand Up @@ -546,7 +585,10 @@ jobs:
if: |
!failure() && !cancelled() &&
(
github.event_name == 'push' ||
(
github.event_name == 'push' &&
github.repository == 'WordPress/openverse'
) ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.owner.login == 'WordPress' &&
Expand All @@ -561,8 +603,6 @@ jobs:
- test-ing
- test-api
- nuxt-build
env:
REPO_NAME: ${{ github.event.pull_request.head.repo.name }}

steps:
- name: Checkout repository
Expand All @@ -583,8 +623,8 @@ jobs:
- name: Recreate working directory # to avoid superfluous files from getting tracked automatically
run: |
cd ..
sudo rm -rf "$REPO_NAME"
mkdir "$REPO_NAME"
sudo rm -rf openverse
mkdir openverse
- name: Checkout repository at `gh-pages` branch
uses: actions/checkout@v3
Expand Down

0 comments on commit 6c83452

Please sign in to comment.