91 lines (91 loc) · 2.27 KB
/
grade.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright (c) 2024 Rafael Guterres Jeffman
# See the file COPYING for license details.
---
name: grade_work
run-name:
on: [push, pull_request]
jobs:
lint_check:
name: Avaliação do pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: |
pip install pylint
pylint src
pep8_check:
name: Avaliação do flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: |
pip install flake8
flake8 --ignore=E501 src
docs_check:
name: Verifica documentação mínima do cốdigo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: |
pip install pydocstyle
pydocstyle src
run_tests:
name: Executa os testes de avaliação
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: |
pip install behave
pip install -e .
behave
- name: Arquiva resultados
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: homework_evaluation
path: RESULT
retention-days: 1
report_result:
name: Resultados da avaliação
if: ${{ always() }}
needs: run_tests
runs-on: ubuntu-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: homework_evaluation
- run: sed -n -e '$ ! p' RESULT
name: Resultado
report_grade:
name: Previsão de nota final
if: ${{ always() }}
needs: run_tests
runs-on: ubuntu-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: homework_evaluation
- run: sed -n -e '$ p' RESULT
name: Previsão de Nota