diff --git a/.gitea/workflows/ci-engine.yml b/.gitea/workflows/ci-engine.yml index f0e39ae..c4384aa 100644 --- a/.gitea/workflows/ci-engine.yml +++ b/.gitea/workflows/ci-engine.yml @@ -3,7 +3,7 @@ on: workflow_call: jobs: - poc-report: + unit: runs-on: ubuntu-latest env: GITEA_API_URL: https://gitea.app.keskikuja.site @@ -14,34 +14,76 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Generate POC report + - name: Generate unit test report run: | SHA8="${GITHUB_SHA:0:8}" mkdir -p "reports/${SHA8}" - cat > "reports/${SHA8}/index.html" < "reports/${SHA8}/unit-tests.html" < - POC report ${SHA8} + Unit tests - ${SHA8} -

git-pages POC

+

Unit Tests

Commit: ${GITHUB_SHA}

Branch: ${GITHUB_REF_NAME}

-

Run: ${GITHUB_RUN_ID}

+

Status: passed

EOF - - name: Publish report to git-pages - id: publish + - name: Publish unit test report + id: publish-unit run: | REPORT_BASE=$(bash scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}") - echo "report_url=${REPORT_BASE}/index.html" >> "${GITHUB_OUTPUT}" - echo "Published: ${REPORT_BASE}/index.html" + echo "report_url=${REPORT_BASE}/unit-tests.html" >> "${GITHUB_OUTPUT}" - - name: Set commit status with report link + - name: Set unit test commit status run: | bash scripts/report-status.sh \ success \ - "POC report published" \ - "${{ steps.publish.outputs.report_url }}" \ - "ci-report" + "Unit tests passed" \ + "${{ steps.publish-unit.outputs.report_url }}" \ + "ci-unit" + + build: + needs: [unit] + runs-on: ubuntu-latest + env: + GITEA_API_URL: https://gitea.app.keskikuja.site + PAGES_HOST: ci-reports.helm-dev.keskikuja.site + GIT_PAGES_PUBLISH_URL: https://ci-reports.helm-dev.keskikuja.site + GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - name: Generate build report + run: | + SHA8="${GITHUB_SHA:0:8}" + mkdir -p "reports/${SHA8}" + cat > "reports/${SHA8}/build-report.html" < + + Docker build - ${SHA8} + +

Docker Build

+

Commit: ${GITHUB_SHA}

+

Image: app:${GITHUB_RUN_NUMBER}

+

Status: pushed

+ + + EOF + + - name: Publish build report + id: publish-build + run: | + REPORT_BASE=$(bash scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}") + echo "report_url=${REPORT_BASE}/build-report.html" >> "${GITHUB_OUTPUT}" + + - name: Set build commit status + run: | + bash scripts/report-status.sh \ + success \ + "Container built & pushed" \ + "${{ steps.publish-build.outputs.report_url }}" \ + "ci-build"