ci: Do not run perf tests as a part of ok-to-test and make it non blocking (#19140)
Remove perf-tests from /ok-to-test temporarily. **Why** Switch to github runners is causing an issue with perf tests, disabling until that is resolved. Co-authored-by: Satish Gandham <hello@satishgandham.com>
This commit is contained in:
parent
ef397a4dfb
commit
5174ba8375
22
.github/workflows/integration-tests-command.yml
vendored
22
.github/workflows/integration-tests-command.yml
vendored
|
|
@ -845,18 +845,18 @@ jobs:
|
|||
- name: Save the status of the run
|
||||
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
|
||||
|
||||
perf-test:
|
||||
needs: [client-build, server-build, rts-build]
|
||||
# Only run if the build step is successful
|
||||
if: success()
|
||||
name: perf-test
|
||||
uses: ./.github/workflows/perf-test.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
pr: ${{ github.event.client_payload.pull_request.number }}
|
||||
# perf-test:
|
||||
# needs: [client-build, server-build, rts-build]
|
||||
# # Only run if the build step is successful
|
||||
# if: success()
|
||||
# name: perf-test
|
||||
# uses: ./.github/workflows/perf-test.yml
|
||||
# secrets: inherit
|
||||
# with:
|
||||
# pr: ${{ github.event.client_payload.pull_request.number }}
|
||||
|
||||
ui-test-result:
|
||||
needs: [ui-test, fat-container-test, perf-test]
|
||||
needs: [ui-test, fat-container-test]
|
||||
# Only run if the ui-test with matrices step is successful
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -1048,7 +1048,7 @@ jobs:
|
|||
run: echo "$PAYLOAD_CONTEXT"
|
||||
|
||||
- name: Check ui-test set status
|
||||
if: needs.ui-test.result != 'success' || needs.fat-container-test.result != 'success' || needs.perf-test.result != 'success'
|
||||
if: needs.ui-test.result != 'success' || needs.fat-container-test.result != 'success'
|
||||
run: exit 1
|
||||
|
||||
package:
|
||||
|
|
|
|||
230
.github/workflows/test-build-docker-image.yml
vendored
230
.github/workflows/test-build-docker-image.yml
vendored
|
|
@ -399,236 +399,6 @@ jobs:
|
|||
- name: Save the status of the run
|
||||
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
|
||||
|
||||
perf-test:
|
||||
needs: [buildClient, buildServer, buildRts]
|
||||
|
||||
# Only run if the build step is successful
|
||||
if: success()
|
||||
runs-on: ubuntu-latest-4-cores
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: app/client
|
||||
shell: bash
|
||||
|
||||
# Service containers to run with this job. Required for running tests
|
||||
services:
|
||||
# Label used to access the service container
|
||||
redis:
|
||||
# Docker Hub image for Redis
|
||||
image: redis
|
||||
ports:
|
||||
# Opens tcp port 6379 on the host and service container
|
||||
- 6379:6379
|
||||
mongo:
|
||||
image: mongo
|
||||
ports:
|
||||
- 27017:27017
|
||||
steps:
|
||||
- name: Checkout the merged commit from PR and base branch
|
||||
if: github.event_name == 'pull_request_review'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
|
||||
- name: Checkout the head commit of the branch
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Timestamp will be used to create cache key
|
||||
- id: timestamp
|
||||
run: echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
|
||||
|
||||
# In case this is second attempt try restoring status of the prior attempt from cache
|
||||
- name: Restore the previous run result
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/run_result
|
||||
key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: |
|
||||
${{ github.run_id }}-${{ github.job }}-
|
||||
|
||||
# Fetch prior run result
|
||||
- name: Get the previous run result
|
||||
id: run_result
|
||||
run: cat ~/run_result 2>/dev/null || echo 'default'
|
||||
|
||||
# In case of prior failure run the job
|
||||
- if: steps.run_result.outputs.run_result != 'success'
|
||||
run: echo "I'm alive!" && exit 0
|
||||
|
||||
# Set status = success
|
||||
- name: Save the status of the run
|
||||
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
|
||||
|
||||
- name: Use Node.js 16.14.0
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16.14.0"
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
id: yarn-dep-cache-dir-path
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again
|
||||
- name: Cache npm dependencies
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
id: yarn-dep-cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-yarn-dependencies
|
||||
with:
|
||||
path: |
|
||||
${{ steps.yarn-dep-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-dep-
|
||||
|
||||
# Install all the dependencies
|
||||
- name: Install dependencies
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Download the react build artifact
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: client-build
|
||||
path: app/client/build
|
||||
|
||||
- name: Download the server build artifact
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: server-build
|
||||
path: app/server/dist
|
||||
|
||||
# Start server
|
||||
- name: start server
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
working-directory: app/server
|
||||
env:
|
||||
APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools"
|
||||
APPSMITH_REDIS_URL: "redis://127.0.0.1:6379"
|
||||
APPSMITH_ENCRYPTION_PASSWORD: "password"
|
||||
APPSMITH_ENCRYPTION_SALT: "salt"
|
||||
APPSMITH_IS_SELF_HOSTED: false
|
||||
APPSMITH_CLOUD_SERVICES_BASE_URL: https://release-cs.appsmith.com
|
||||
APPSMITH_CLOUD_SERVICES_USERNAME: ""
|
||||
APPSMITH_CLOUD_SERVICES_PASSWORD: ""
|
||||
APPSMITH_GIT_ROOT: "./container-volumes/git-storage"
|
||||
APPSMITH_AUDITLOG_ENABLED: true
|
||||
run: |
|
||||
ls -l
|
||||
ls -l scripts/
|
||||
ls -l dist/
|
||||
# Run the server in the background and redirect logs to a log file
|
||||
./scripts/start-dev-server.sh &> server-logs.log &
|
||||
|
||||
- name: Wait for 30 seconds for server to start
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: |
|
||||
sleep 30s
|
||||
|
||||
- name: Installing Yarn serve
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: |
|
||||
yarn global add serve
|
||||
echo "$(yarn global bin)" >> $GITHUB_PATH
|
||||
|
||||
# Start rts
|
||||
- name: Start RTS Server
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
working-directory: ./app/rts
|
||||
run: |
|
||||
cp .env.example .env
|
||||
./start-server.sh &
|
||||
|
||||
- name: Setting up the perf tests
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
shell: bash
|
||||
env:
|
||||
APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }}
|
||||
APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }}
|
||||
CYPRESS_URL: ${{ secrets.CYPRESS_URL }}
|
||||
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }}
|
||||
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
|
||||
CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME1 }}
|
||||
CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
|
||||
CYPRESS_TESTUSERNAME2: ${{ secrets.CYPRESS_TESTUSERNAME2 }}
|
||||
CYPRESS_TESTPASSWORD2: ${{ secrets.CYPRESS_TESTPASSWORD1 }}
|
||||
CYPRESS_TESTUSERNAME3: ${{ secrets.CYPRESS_TESTUSERNAME3 }}
|
||||
CYPRESS_TESTPASSWORD3: ${{ secrets.CYPRESS_TESTPASSWORD3 }}
|
||||
CYPRESS_TESTUSERNAME4: ${{ secrets.CYPRESS_TESTUSERNAME4 }}
|
||||
CYPRESS_TESTPASSWORD4: ${{ secrets.CYPRESS_TESTPASSWORD4 }}
|
||||
CYPRESS_S3_ACCESS_KEY: ${{ secrets.CYPRESS_S3_ACCESS_KEY }}
|
||||
CYPRESS_S3_SECRET_KEY: ${{ secrets.CYPRESS_S3_SECRET_KEY }}
|
||||
CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID }}
|
||||
CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET }}
|
||||
CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID }}
|
||||
CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET }}
|
||||
APPSMITH_DISABLE_TELEMETRY: true
|
||||
APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }}
|
||||
POSTGRES_PASSWORD: postgres
|
||||
run: |
|
||||
./cypress/setup-test.sh
|
||||
|
||||
- name: Checkout Performance Infra code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: appsmithorg/performance-infra
|
||||
token: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }}
|
||||
ref: main
|
||||
path: app/client/perf
|
||||
|
||||
- name: Installing performance tests dependencies
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
working-directory: app/client/perf
|
||||
shell: bash
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Change test script permissions
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
working-directory: app/client/perf
|
||||
run: chmod +x ./start-test.sh
|
||||
|
||||
- name: Run performance tests
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
working-directory: app/client/perf
|
||||
shell: bash
|
||||
env:
|
||||
APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }}
|
||||
APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }}
|
||||
CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME9 }}
|
||||
CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD9 }}
|
||||
APPSMITH_PERFORMANCE_DB_CONFIG: ${{ secrets.APPSMITH_PERFORMANCE_DB_CONFIG }}
|
||||
PERF_GITHUB_PAT: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }}
|
||||
APPSMITH_DISABLE_TELEMETRY: true
|
||||
POSTGRES_PASSWORD: postgres
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
||||
run: ./start-test.sh
|
||||
|
||||
# Restore the previous built bundle if present. If not push the newly built into the cache
|
||||
- name: Restore the previous bundle
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
app/client/perf/traces
|
||||
key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }}
|
||||
restore-keys: |
|
||||
${{ github.run_id }}-${{ github.job }}
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: performance-summaries
|
||||
path: app/client/perf/traces
|
||||
|
||||
# Set status = success
|
||||
- name: Save the status of the run
|
||||
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
|
||||
|
||||
fat-container-test:
|
||||
needs: [buildClient, buildServer, buildRts]
|
||||
# Only run if the build step is successful
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user