On overnight build #375
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: On overnight build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: "0 2 * * *" # Runs at 2 AM UTC every day | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Create .env File | |
| run: | | |
| echo "USERNAME=${{ secrets.USERNAME }}" >> .env | |
| echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env | |
| - name: Run Playwright Tests | |
| env: | |
| USERNAME: ${{ secrets.USERNAME }} | |
| PASSWORD: ${{ secrets.PASSWORD }} | |
| run: npm test | |
| - name: Generate Allure Report | |
| run: npx allure generate --clean | |
| - name: Get Allure history | |
| uses: actions/checkout@v3 | |
| if: always() | |
| continue-on-error: true | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Allure Report action from marketplace | |
| uses: simple-elf/allure-report-action@master | |
| if: always() | |
| id: allure-report | |
| with: | |
| allure_results: allure-results | |
| gh_pages: gh-pages | |
| allure_report: allure-report | |
| allure_history: allure-history | |
| - name: Deploy Allure Report to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PUBLISH_BRANCH: gh-pages | |
| PUBLISH_DIR: allure-history |