Update README.md #18
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: QA Automation Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout código | |
| uses: actions/checkout@v4 | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| with: | |
| chrome-version: 'stable' | |
| - name: Configurar headless para CI | |
| run: | | |
| sed -i 's/headless=false/headless=true/' selenium-java/selenium-java/src/test/resources/config.properties | |
| sed -i 's/timeout.explicit=10/timeout.explicit=30/' selenium-java/selenium-java/src/test/resources/config.properties | |
| - name: Ejecutar tests | |
| working-directory: selenium-java/selenium-java | |
| run: mvn clean test | |
| - name: Instalar Allure CLI | |
| if: always() | |
| run: | | |
| curl -o allure.tgz -L https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.tgz | |
| tar -xzf allure.tgz | |
| echo "$PWD/allure-2.25.0/bin" >> $GITHUB_PATH | |
| - name: Generar reporte Allure | |
| if: always() | |
| run: allure generate selenium-java/selenium-java/target/allure-results -o allure-report --clean | |
| - name: Guardar allure-results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-results | |
| path: selenium-java/selenium-java/target/allure-results/ | |
| - name: Guardar allure-report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report | |
| path: allure-report/ | |
| - name: Publicar reporte en GitHub Pages | |
| if: always() | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: allure-report |