Refatoração no projeto para ganho de performance #4
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 - API Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
api-tests: | |
runs-on: ubuntu-22.04 | |
name: Run Robot Framework API Tests 🤖 | |
steps: | |
- name: Checkout 🚀 | |
uses: actions/checkout@v3 | |
- name: Install Robot Framework | |
run: | | |
pip install robotframework | |
- name: Install Python Requests Library | |
run: | | |
pip install robotframework-requests | |
- name: API Tests ✅ | |
run: | | |
robot -d ./logs tests/ | |
- name: Upload Reports 📖 | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Execution Test Reports | |
path: logs/ | |
if-no-files-found: warn | |
- name: Slack Notification - Success | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_CHANNEL: pipeline-notifications | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_ICON: https://cdn-icons-png.flaticon.com/512/1642/1642322.png | |
SLACK_TITLE: 'All tests passed successfully' | |
SLACK_MESSAGE: ':robot: Tests after Pull Request passed :robot:' | |
SLACK_USERNAME: SUCCESS | |
- name: Slack Notification - Failure | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_CHANNEL: pipeline-notifications | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_ICON: https://www.novaconcursos.com.br/portal/wp-content/uploads/2013/12/erro-que-concurseiro-comente-300x3001.png | |
SLACK_TITLE: 'Some tests failed' | |
SLACK_MESSAGE: ':fire: Tests after Pull Request failed :fire:' | |
SLACK_USERNAME: FAILURE |