Add DO_CLEAN into preapre.sh (#6098)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-07-19 15:09:13 +07:00 committed by GitHub
parent c34b3a7ad2
commit 3f5d1ceef8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 42 additions and 30 deletions

View File

@ -219,6 +219,7 @@ jobs:
- name: Prepare server - name: Prepare server
run: | run: |
cd ./tests cd ./tests
export DO_CLEAN=true
./prepare.sh ./prepare.sh
- name: Install Playwright - name: Install Playwright
run: | run: |
@ -242,35 +243,35 @@ jobs:
with: with:
name: playwright-results name: playwright-results
path: ./tests/sanity/playwright-report/ path: ./tests/sanity/playwright-report/
- name: Get Allure history # - name: Get Allure history
uses: actions/checkout@v4 # uses: actions/checkout@v4
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} # if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
continue-on-error: true # continue-on-error: true
with: # with:
ref: gh-pages # ref: gh-pages
path: gh-pages # path: gh-pages
- name: Generates Allure Report # - name: Generates Allure Report
uses: simple-elf/allure-report-action@master # uses: simple-elf/allure-report-action@master
if: always() # if: always()
id: allure-report # id: allure-report
with: # with:
allure_results: ./tests/sanity/allure-results/ # allure_results: ./tests/sanity/allure-results/
gh_pages: gh-pages # gh_pages: gh-pages
allure_report: allure-report # allure_report: allure-report
allure_history: allure-history # allure_history: allure-history
- name: Upload allure test results # - name: Upload allure test results
if: always() # if: always()
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: allure-report # name: allure-report
path: ./allure-report/ # path: ./allure-report/
- name: Deploy report to Github Pages # - name: Deploy report to Github Pages
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} # if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
uses: peaceiris/actions-gh-pages@v4 # uses: peaceiris/actions-gh-pages@v4
with: # with:
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} # PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages # PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history # PUBLISH_DIR: allure-history
- name: Upload Logs - name: Upload Logs
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -318,6 +319,7 @@ jobs:
- name: Prepare server - name: Prepare server
run: | run: |
cd ./qms-tests cd ./qms-tests
export DO_CLEAN=true
./prepare.sh ./prepare.sh
- name: Install Playwright - name: Install Playwright
run: | run: |

View File

@ -18,7 +18,7 @@
"docker:build": "../../common/scripts/docker_build.sh hardcoreeng/tool", "docker:build": "../../common/scripts/docker_build.sh hardcoreeng/tool",
"docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging", "docker:staging": "../../common/scripts/docker_tag.sh hardcoreeng/tool staging",
"docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tool", "docker:push": "../../common/scripts/docker_tag.sh hardcoreeng/tool",
"run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --max-old-space-size=18000 ./bundle/bundle.js", "run-local": "rush bundle --to @hcengineering/tool >/dev/null && cross-env SERVER_SECRET=secret ACCOUNTS_URL=http://localhost:3000 TRANSACTOR_URL=ws://localhost:3333 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_ENDPOINT=localhost MONGO_URL=mongodb://localhost:27017 TELEGRAM_DATABASE=telegram-service ELASTIC_URL=http://localhost:9200 REKONI_URL=http://localhost:4004 MODEL_VERSION=$(node ../../common/scripts/show_version.js) GIT_REVISION=$(git describe --all --long) node --max-old-space-size=18000 ./bundle/bundle.js",
"run": "rush bundle --to @hcengineering/tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js", "run": "rush bundle --to @hcengineering/tool >/dev/null && cross-env node --max-old-space-size=8000 ./bundle/bundle.js",
"upgrade": "rushx run-local upgrade", "upgrade": "rushx run-local upgrade",
"format": "format src", "format": "format src",

View File

@ -11,6 +11,11 @@ else
exit ${docker_exit} exit ${docker_exit}
fi fi
if [ "x$DO_CLEAN" == 'xtrue' ]; then
echo 'Do docker Clean'
docker system prune -a -f
fi
# Create init workspace # Create init workspace
./tool.sh create-workspace init-ws-qms -w InitTest ./tool.sh create-workspace init-ws-qms -w InitTest

View File

@ -11,6 +11,11 @@ else
exit ${docker_exit} exit ${docker_exit}
fi fi
if [ "x$DO_CLEAN" == 'xtrue' ]; then
echo 'Do docker Clean'
docker system prune -a -f
fi
./wait-elastic.sh 9201 ./wait-elastic.sh 9201
# Create workspace record in accounts # Create workspace record in accounts