Skip to content

Commit

Permalink
chore(testing): cleanup old playwright test github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
akiva10b committed Sep 7, 2023
1 parent 13d69c4 commit 80e150a
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,79 +266,6 @@ jobs:
env:
WAIT_DURATION: "3000"
GIT_COMMIT: "${{ steps.get-sha.outputs.sha_short }}"
playwright-tests:
if: ${{ github.event_name == 'pull_request' }}
name: "Playwright" # This name is referenced when slacking status
needs: sandbox-ready
runs-on: ubuntu-latest
steps:
# BEGIN SETUP
- name: Checkout Code
uses: actions/checkout@v3
- name: Set Up Python 3
with:
python-version: '3.7'
uses: actions/setup-python@v1
- name: Set Up Node
uses: actions/setup-node@v3
with:
node-version: 16
# Set Up Connection to Dev Mongo
# 1. Auth to cluster
# 2. Open encrypted connection
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_CLOUDBUILD_SA_KEY }}
project_id: ${{ secrets.DEV_PROJECT }}
- name: Authenticate GHA Runner To Target Cluster
run: gcloud container clusters get-credentials ${{secrets.DEV_GKE_CLUSTER}} --zone ${{secrets.DEV_GKE_REGION}} --project ${{secrets.DEV_GCP_PROJECT}}
- name: Establish MongoDB Connection
run: kubectl port-forward svc/mongo 27017:27017 &
- name: Await MongoDB Connection
run: sleep 20
- name: Confirm MongoDB Connection
# The following command returns a success code if mongo is available,
# and a failure code if it is not
run: curl localhost:27017
- name: Establish PostgreSQL Connection
run: kubectl port-forward svc/postgres 5432:5432 &
- name: Await MongoDB Connection
run: sleep 20
- name: Confirm PostgreSQL Connection
# if the PostgreSQL server is available, curl will fail with a '52' exit code
# if it is NOT available, it will fail with a '7' exit code
# run: curl localhost:5432; if [ $? -eq "52" ]; then exit 0; else exit 1; fi
run: exitCode=$(curl localhost:5432; echo $?); if [ $exitCode -eq 52 ]; then exit 0; else exit 1; fi
- name: Set outputs
id: get-sha
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
# END SETUP
- name: Install Python Packages
run: pip3 install -r ./requirements.txt
- name: Install test dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
env:
CI_RUN: "true"
CI_URL: https://sandbox-${{ steps.get-sha.outputs.sha_short }}.cauldron.sefaria.org
SEFARIA_TEST_PASS: ${{ secrets.SEFARIA_APP_PASS }}
SEFARIA_TEST_USER: ${{ secrets.SEFARIA_APP_USER }}
GITHUB_SHA_SORT: ${{ steps.get-sha.outputs.sha_short }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Authenticate GHA Runner to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCS_BUILD_UPLOAD_KEY }}
project_id: ${{ secrets.BUILD_UPLOAD_PROJECT }}
if: ${{ always() }}
pytest-job:
if: ${{ github.event_name == 'pull_request' }}
name: "PyTest" # This name is referenced when slacking status
Expand Down

0 comments on commit 80e150a

Please sign in to comment.