Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/betrybe/pytest-evaluator-action
đ Pytest Evaluator Action
https://github.com/betrybe/pytest-evaluator-action
github-actions pytest python test
Last synced: about 1 month ago
JSON representation
đ Pytest Evaluator Action
- Host: GitHub
- URL: https://github.com/betrybe/pytest-evaluator-action
- Owner: betrybe
- Created: 2020-09-14T18:59:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T18:01:15.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T19:41:16.044Z (9 months ago)
- Topics: github-actions, pytest, python, test
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 43
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pytest Evaluator Action
Essa action executa o avaliador Pytest em projetos e exercĂcios da Trybe.
### Instalação de dependĂȘncias
```sh
make install
# or
python3 -m pip install -r requirements.txt
```### Testes
```sh
make test
# or
python3 -m pytest
```## Evaluator Action
Para executar a action Ă© preciso criar ou editar o arquivo `.github/workflows/main.yml` no repositĂłrio do exercĂcio/projeto, e incluir as etapas `Fetch PyTest evaluator`, `Set Python Version` e `Run PyTest evaluation`, como exemplificado abaixo:
```yml
on:
pull_request:
types: [opened, synchronize]jobs:
evaluator:
timeout-minutes: 20
runs-on: self-hosted
steps:
...- name: Fetch PyTest evaluator
uses: actions/checkout@v3
with:
repository: betrybe/pytest-evaluator-action
ref: v6.0
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/pytest-evaluator- name: Set Python Version
uses: actions/setup-python@v4
with:
python-version: "3.10.6"- name: Run PyTest evaluation
id: evaluator
uses: ./.github/actions/pytest-evaluator
with:
pr_author_username: ${{ github.event.pull_request.user.login }}- name: Run Store evaluation
uses: ./.github/actions/store-evaluation
with:
evaluation-data: ${{ steps.evaluator.outputs.result }}
environment: production
token: ${{ secrets.GITHUB_TOKEN }}
```## Inputs
- `pr_author_username` (**obrigatĂłrio**)
O GitHub username do autor do Pull Request.### Outputs
- `result`
O resultado da avaliação em JSON codificado em base64.