[MAPPS-4078] Fixed upgrade readiness python3 issues (#147) #404
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright E2E Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
# We don't want to cancel any redundant runs on main so we use run_id when head_ref is | |
# not available | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
# fow now, skip it | |
# if: false | |
steps: | |
- uses: actions/checkout@v4 | |
# install python stuff | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- name: Install Python dependencies | |
run: | | |
make dev-install-dependencies-pack | |
make dev-install-dependencies-pack-sudo | |
make dev-install-dependencies-for-development | |
- name: Export current snapshot of app | |
run: echo "SDLAPP_VERSION_CURRENT_SNAPSHOT=$(jq -r '.meta.version' globalConfig.json)" >> $GITHUB_ENV | |
# build splunk application | |
- name: Build Splunk Application | |
run: | | |
scripts/pack.sh \ | |
--version "${{ env.SDLAPP_VERSION_CURRENT_SNAPSHOT }}-E2ETesting" \ | |
--input TA_dataset \ | |
--output output \ | |
--release release | |
# run Splunk | |
- name: Run Splunk | |
run: | | |
make docker-splunk-run-ci | |
# install node stuff | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install NPM dependencies | |
run: | | |
make e2e-install | |
- name: Create .env file | |
run: | | |
echo "SPLUNK_USER=${{ secrets.SPLUNK_USER }}" >> .env | |
echo "SPLUNK_PASSWORD=${{ secrets.SPLUNK_PASSWORD }}" >> .env | |
echo "DATASET_URL=${{ secrets.DATASET_URL }}" >> .env | |
echo "DATASET_LOG_ACCESS_READ=${{ secrets.DATASET_LOG_ACCESS_READ }}" >> .env | |
echo "DATASET_LOG_ACCESS_WRITE=${{ secrets.DATASET_LOG_ACCESS_WRITE }}" >> .env | |
- name: Wait for Splunk | |
run: | | |
docker ps | |
while [ "$(docker ps -f name=splunk --format 'table {{.Names}},{{.Status}}' | grep 'healthy' -c)" -ne 1 ]; do echo "waiting until splunk container is healthy"; sleep 1; done | |
docker ps | |
make dev-wait-for-splunk | |
- name: Run Playwright tests | |
run: | | |
make e2e-test | |
- name: Get Splunk logs | |
if: always() | |
run: | | |
make docker-splunk-tail-logs-count COUNT=1000 > splunk-logs.log | |
- name: Store playwright-report | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Store playwright-screenshots | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-screenshots | |
path: playwright-screenshots/ | |
retention-days: 30 | |
- name: Store splunk-logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: splunk-logs.log | |
path: splunk-logs.log | |
retention-days: 30 |