Atualização do script da pipeline #12
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
# This is a basic workflow to help you get started with Actions | |
name: Newman run collections | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
jobs: | |
newman: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
- name: Create directory for report | |
run: | | |
mkdir testArtifacts | |
- name: Install Newman | |
run: | | |
npm install -g newman | |
npm install -g newman-reporter-htmlextra | |
- name: Run Newman | |
run: | | |
newman run servRest.postman_collection.json -e servRest_test.postman_environment.json -r htmlextra --reporter-htmlextra-export ./exports_reports/relatorio.html --reporter-htmlextra-title "Relatório API ServRest CI/CD" --reporter-htmlextra-titleSize 78 | |
- name: Upload Reports | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: Reports | |
path: testArtifacts |