dev-completed #109
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: CI Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| repository_dispatch: | |
| types: [dev-completed] | |
| jobs: | |
| version-release: | |
| if: github.event_name == 'push' || github.event_name == 'repository_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: npm run test | |
| - name: Push results to InfluxDB | |
| if: always() | |
| run: npm run send-results | |
| env: | |
| INFLUXDB_URL: https://us-east-1-1.aws.cloud2.influxdata.com | |
| INFLUXDB_TOKEN: pRQ-qI3722-X5pL3lmpJ7WBeKIHnLLwvpyexQeVSZUXM3pR1DllJWnkvmY4BrNN6Vr4eJbIEVmH6UcN-yopmoQ== | |
| INFLUXDB_ORG: teknotrait | |
| INFLUXDB_BUCKET: automations-results | |
| - name: Send test report via email | |
| if: always() | |
| uses: dawidd6/action-send-mail@v3 | |
| with: | |
| server_address: smtp.gmail.com | |
| server_port: 465 | |
| username: ${{ secrets.EMAIL_USER }} | |
| password: ${{ secrets.EMAIL_PASS }} | |
| subject: Test Report - ${{ github.run_number }} | |
| to: mapleclub512@gmail.com | |
| from: CI Bot <${{ secrets.EMAIL_USER }}> | |
| attachments: test-results/cucumber-report.html | |
| body: | | |
| Hello, | |
| The test report for version ${{ github.ref }} (Run #${{ github.run_number }}) is attached. | |
| Best, | |
| Your GitHub Actions CI/CD Pipeline |