fix: Кнопка поделиться теперь попадает в меню троеточие #67
Workflow file for this run
This file contains hidden or 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: tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Starting Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm install --force | |
| - name: Build | |
| run: npm run build | |
| linting: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Starting Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm install --force | |
| - name: Lint | |
| run: npm run lint | |
| smoke_autotests: | |
| needs: linting | |
| runs-on: ubuntu-latest | |
| outputs: | |
| smoke_desktop: ${{ steps.smoke_desktop.outcome }} | |
| smoke_mobile: ${{ steps.smoke_mobile.outcome }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Chrome | |
| run: | | |
| # Установка зависимостей | |
| sudo apt-get update | |
| sudo apt-get install -y wget unzip | |
| # Добавление репозитория Google Chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | |
| sudo apt-get update | |
| # Установка Chrome | |
| sudo apt-get install -y google-chrome-stable | |
| # Проверка версии Chrome | |
| echo "Chrome version: $(google-chrome --version)" | |
| - name: install requirements | |
| run: pip install -r tests/requirements.txt | |
| - name: install webdriver | |
| run: | | |
| wget https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.49/linux64/chromedriver-linux64.zip | |
| unzip chromedriver-linux64.zip | |
| sudo install -o root -g root -m 755 chromedriver-linux64/chromedriver /usr/local/bin/ | |
| chromedriver --version | |
| - name: run sever 1 step | |
| run: sudo npm i --global pnpm | |
| - name: run sever 2 step | |
| run: pnpm i --force | |
| - name: run sever 3 step | |
| run: pnpm db & | |
| - name: run sever 4 step | |
| run: pnpm dev & | |
| - name: Check server | |
| run: | | |
| timeout 60 bash -c 'until curl -s http://localhost:3001 >/dev/null; do sleep 1; done' | |
| echo "Server is ready!" | |
| - name: Check CPU cores | |
| run: | | |
| echo "CPU cores: $(nproc)" | |
| echo "Using pytest-xdist with -n auto or -n 2" | |
| - name: open tests directory | |
| run: cd tests | |
| - name: smoke_desktop | |
| id: smoke_desktop | |
| run: pytest -s -v -m smoke_desktop -n auto --alluredir=allure-results --tb=line --reruns 2 --stage=dev_desktop | |
| continue-on-error: true | |
| - name: smoke_mobile | |
| id: smoke_mobile | |
| run: pytest -s -v -m smoke_mobile -n auto --alluredir=allure-results --tb=line --reruns 2 --stage=dev_mobile | |
| continue-on-error: true | |
| - run: sudo apt install zip && zip -r allure-results.zip allure-results | |
| - name: Upload Results | |
| run: > | |
| UUID=$(curl -X "POST" 'http://${{ secrets.SERVER }}/api/result' | |
| -H 'accept: */*' | |
| -H 'Content-Type: multipart/form-data' | |
| -F 'allureResults=@allure-results.zip;type=application/zip' | |
| | python3 -c "import sys, json; print(json.load(sys.stdin)['uuid']);") | |
| && | |
| curl -X 'POST' | |
| "http://${{ secrets.SERVER }}/api/report" | |
| -H 'accept: */*' | |
| -H 'Content-Type: application/json' | |
| -d "{\"reportSpec\":{\"path\":[\"pathstring\"],\"executorInfo\":{\"name\":\"GitHub\",\"type\":\"exectype\",\"url\":\"https://github.com/CineNetwork/Frontend/actions/workflows/tests_pipeline%20copy.yaml\",\"buildOrder\":0,\"buildName\":\"$GITHUB_RUN_NUMBER\",\"buildUrl\":\"https://github.com/CineNetwork/Frontend/actions/runs/$GITHUB_RUN_ID\",\"reportName\":\"my_report_name\",\"reportUrl\":\"my_report_url\"}},\"results\":[\"$UUID\"],\"deleteResults\":true}" | |
| - name: Store allure results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: | |
| allure-results | |
| retention-days: 1 | |
| - name: success | |
| if: steps.smoke_mobile.outcome != 'failure' && steps.smoke_desktop.outcome != 'failure' | |
| run: | | |
| curl --location 'https://api.telegram.org/bot${{ secrets.TG }}/sendMessage' --header 'Content-Type: application/json' --data '{"chat_id": -1002200034809, "message_thread_id": 1444, "text": "PR: #${{ github.event.pull_request.number }} Результаты тестов готовы!\nРезультат = Passed.\nОтчет: http://212.69.84.39/ui/"}' | |
| - name: failure | |
| if: steps.smoke_mobile.outcome == 'failure' || steps.smoke_desktop.outcome == 'failure' | |
| run: | | |
| curl --location 'https://api.telegram.org/bot${{ secrets.TG }}/sendMessage' --header 'Content-Type: application/json' --data '{"chat_id": -1002200034809, "message_thread_id": 1444, "text": "PR: #${{ github.event.pull_request.number }} Результаты тестов готовы!\nРезультат = FAILED.\nОтчет: http://212.69.84.39/ui/"}' |