-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (44 loc) · 1.41 KB
/
tests_env.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
name: Tests Status 🧪
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
test-env:
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.x # Choose the desired Python version
- name: Cache Python Dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
sudo apt update
sudo apt upgrade
sudo apt-get install -y libgdal-dev gdal-bin
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Pytest
run: |
cd ${{ github.workspace }}
python -m pytest --junitxml=pytest_report.xml # Gera um arquivo de relatório em formato XML
- name: Add XSLT Style to XML Report
run: |
echo '<?xml-stylesheet type="text/xsl" href="transformacao.xsl"?>' | cat - pytest_report.xml > temp && mv temp pytest_report.xml
- name: Upload Pytest Report
uses: actions/upload-artifact@v4
with:
name: Pytest Reports
path: pytest_report.xml