Workflow config file is invalid. Please check your config file: yaml: line 3: mapping values are not allowed in this context
2025-12-12 19:03:17 +01:00

58 lines
1.9 KiB
YAML

I have rewritten the Gitea Actions YAML workflow to include the Build, two separate Test jobs, and Deploy jobs, while removing the three-line comments that indicated the job number and name.
Here is the revised pipeline structure:
YAML
name: CI/CD Build Test Deploy Pipeline
run-name: ${{ gitea.actor }} is deploying a change 🚀
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Checkout repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- name: List files in the repository
run: |
echo "Listing files to confirm build context..."
ls ${{ gitea.workspace }}
- run: echo "✅ BUILD stage completed successfully. Artifacts would be generated here."
unit_test:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Run Unit Tests
run: echo "🧪 Starting Unit Tests (First test job echo)."
- run: echo "👍 UNIT TEST job finished."
integration_test:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Run Integration Tests
run: echo "✅ Integration Tests Passed (Second test job echo)."
- run: echo "👍 INTEGRATION TEST job finished."
deploy:
needs: [unit_test, integration_test]
runs-on: ubuntu-latest
steps:
- name: Deploy Application
run: |
echo "🚀 Deploying to Production/Staging environment..."
echo "Deployment initiated at $(date) (The deploy echo)."
- run: echo "🍏 Pipeline finished. The final job status is ${{ job.status }}."