diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 394c807..e68115f 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -1,19 +1,58 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions ๐Ÿš€ +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: - Explore-Gitea-Actions: + 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: Check out repository code + + - name: Checkout repository code uses: actions/checkout@v4 + - run: echo "๐Ÿ’ก The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "๐Ÿ–ฅ๏ธ The workflow is now ready to test your code on the runner." + - name: List files in the repository run: | + echo "Listing files to confirm build context..." ls ${{ gitea.workspace }} - - run: echo "๐Ÿ This job's status is ${{ job.status }}." \ No newline at end of file + + - 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 }}." \ No newline at end of file