Exemplo de um print de variáveis de um workflow called #17
This file contains 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: Robot Framework CI | |
on: | |
push: | |
workflow_dispatch: | |
permissions: | |
contents: write # Permite que o GITHUB_TOKEN leia e escreva no conteúdo do repositório, incluindo fazer commit e push em branches | |
pages: write # Necessário se você estiver usando GitHub Pages para publicar relatórios ou páginas estáticas | |
id-token: write # Usado para autenticação avançada, caso necessário. | |
jobs: | |
test_web: | |
name: Web Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Install Allure command-line | |
run: npm install -g allure-commandline | |
- name: Install Allure adapter for Robot Framework | |
run: pip install allure-robotframework | |
- name: Check Allure version | |
run: allure --version | |
- name: Run Tests | |
run: | | |
robot --listener allure_robotframework:results/allure-results --outputdir results --variable BROWSER:headlesschrome tests | |
- name: Generate the Allure Report | |
run: | | |
allure generate results/allure-results --clean -o results/allure-report | |
- name: Load test report history | |
uses: actions/checkout@v4 | |
if: always() | |
continue-on-error: true | |
with: | |
ref: gh-pages # the branch used for the GitHub Pages content. | |
path: gh-pages # an arbitrary name for a directory to which the previous data will be saved | |
- name: Build test report | |
uses: simple-elf/[email protected] | |
if: always() | |
with: | |
gh_pages: gh-pages # the directory name to which the previous data was downloaded. Must be the same as the path value from the Load test reports history step. | |
allure_history: allure-history | |
allure_results: results/allure-results | |
allure_report: results/allure-report | |
- name: Publish test report | |
uses: peaceiris/actions-gh-pages@v4 | |
if: always() | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: allure-history | |
- name: Upload Web Test Report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test Results | |
path: results/ |