Skip to content

Commit

Permalink
chore: change playwright to a docker container (#172)
Browse files Browse the repository at this point in the history
## Description

Change to docker container to run playwright tests to help with cache
issues.

## Related Issue

Fixes #N/A

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Other (security config, docs update, etc)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-gitlab/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
Racer159 authored Jul 23, 2024
1 parent 0e9ea0b commit 9c805ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ jobs:
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}

- name: Playwright setup
uses: defenseunicorns/uds-common/.github/actions/playwright@172a905901cb9bd76d096d2850bf31af5c5a4fa1 # v0.8.0

- name: Build Package
run: uds run -f tasks/publish.yaml build-package --set FLAVOR=${{ matrix.flavor }} --no-progress

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ jobs:
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}

- name: Playwright setup
uses: defenseunicorns/uds-common/.github/actions/playwright@172a905901cb9bd76d096d2850bf31af5c5a4fa1 # v0.8.0

- name: Test
uses: defenseunicorns/uds-common/.github/actions/test@172a905901cb9bd76d096d2850bf31af5c5a4fa1 # v0.8.0
with:
Expand Down
14 changes: 6 additions & 8 deletions tasks/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ tasks:
- name: ui
description: GitLab UI Checks
actions:
- cmd: npx playwright test
- cmd: |
docker run --rm --ipc=host --net=host --mount type=bind,source="$(pwd)",target=/app mcr.microsoft.com/playwright:v1.43.1-jammy sh -c " \
cd app && \
npm ci && \
npx playwright test \
"
dir: tests
- name: create-doug-admin
Expand Down Expand Up @@ -152,10 +157,3 @@ tasks:
actions:
- description: Get the root password for GitLab (useful for local dev)
cmd: ./uds zarf tools kubectl get secret -n gitlab gitlab-gitlab-initial-root-password -o jsonpath={.data.password} | base64 -d

- name: install-playwright-deps
actions:
- cmd: npm ci
dir: tests
- cmd: npx playwright install --with-deps
dir: tests

0 comments on commit 9c805ff

Please sign in to comment.