Skip to content

Abacus-and-API-Playwright-Tests #392

Abacus-and-API-Playwright-Tests

Abacus-and-API-Playwright-Tests #392

name: Abacus-and-API-Playwright-Tests
on:
pull_request:
branches: [main]
repository_dispatch:
types: [xtest]
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
inputs:
backendVersion:
required: true
type: string
frontendVersion:
required: true
type: string
jobs:
abacus-playwright-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: abacus-and-api-integration-tests
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: https://npm.pkg.github.com
- name: Install dependencies
run: |-
npm ci
npx playwright install
- uses: yokawasa/[email protected]
with:
setup-tools: |
kubectl
helm
tilt
kubectl: "1.24.1"
helm: "3.9.2"
tilt: "0.31.2"
- run: |
kubectl version --client
kustomize version
tilt version
- name: start minikube
id: minikube
uses: medyagh/setup-minikube@master
with:
minikube-version: 1.26.0
# This should be in sync with the setup-tools version above
kubernetes-version: 1.24.1
- name: Run tilt
run: |-
[[ -z "${{github.event.inputs.backendVersion}}" ]] && export BACKEND_LATEST_VERSION=$(skopeo list-tags docker://ghcr.io/opentdf/charts/backend \
| python3 -c "import sys, json; sys.stdout.write([tag for tag in json.load(sys.stdin)['Tags'] if not tag.endswith('.sig')][-1])") || export BACKEND_LATEST_VERSION="${{github.event.inputs.backendVersion}}"
echo "Testing Backend [$BACKEND_LATEST_VERSION]">>$GITHUB_STEP_SUMMARY
[[ -z "${{github.event.inputs.frontendVersion}}" ]] && export FRONTEND_LATEST_VERSION=$(skopeo list-tags docker://ghcr.io/opentdf/charts/abacus \
| python3 -c "import sys, json; sys.stdout.write([tag for tag in json.load(sys.stdin)['Tags'] if not tag.endswith('.sig')][-1])") || export FRONTEND_LATEST_VERSION="${{github.event.inputs.frontendVersion}}"
echo "Testing Frontend [$FRONTEND_LATEST_VERSION]">>$GITHUB_STEP_SUMMARY
kubectl version
tilt ci
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-test-results
path: ./abacus-and-api-integration-tests/test-results