Update .gitea/workflows/test.yml
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 22s
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 22s
This commit is contained in:
@@ -62,36 +62,11 @@ jobs:
|
||||
echo "✅ Python tools installed"
|
||||
pip list
|
||||
|
||||
- name: Install Java
|
||||
run: |
|
||||
echo "☕ Installing Java..."
|
||||
sudo apt update > java.log 2>&1 && sudo apt install -y openjdk-11-jdk >> java.log 2>&1 || {
|
||||
echo "❌ Java installation failed"
|
||||
cat java.log | grep -i 'error\|fatal'
|
||||
exit 1
|
||||
}
|
||||
echo "✅ Java installed"
|
||||
java -version
|
||||
|
||||
- name: Install Allure CLI
|
||||
run: |
|
||||
echo "📊 Installing Allure..."
|
||||
curl -sL https://github.com/allure-framework/allure2/releases/download/2.27.0/allure-2.27.0.tgz | tar -xz > allure.log 2>&1 || {
|
||||
echo "❌ Allure download failed"
|
||||
cat allure.log | grep -i 'error\|fatal'
|
||||
exit 1
|
||||
}
|
||||
|
||||
sudo mv allure-2.27.0 /opt/allure
|
||||
sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure
|
||||
echo "✅ Allure installed"
|
||||
allure --version
|
||||
|
||||
- name: Run tests and generate reports
|
||||
run: |
|
||||
echo "🚀 Running tests and generating reports..."
|
||||
source venv/bin/activate
|
||||
mkdir -p ci-reports/{allure,coverage,markdown}
|
||||
mkdir -p ci-reports/{coverage,markdown}
|
||||
|
||||
echo "🧪 Running pytest with coverage and report generation..."
|
||||
pixi run pytest . \
|
||||
@@ -99,7 +74,6 @@ jobs:
|
||||
--cov=functions \
|
||||
--cov-report=xml:ci-reports/coverage/coverage.xml \
|
||||
--cov-report=html:ci-reports/coverage/ \
|
||||
--alluredir=allure-results \
|
||||
--json-report \
|
||||
--json-report-file=ci-reports/markdown/pytest-report.json \
|
||||
--capture=no > ci-reports/markdown/raw-test-output.log 2>&1 && {
|
||||
|
||||
Reference in New Issue
Block a user