Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example pipeline for Monorepo #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
version: "v1.0"
name: Pipeline with parallel blocks
name: Monorepo pipeline
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804

blocks:
- name: "Code quality checks"
- name: "Backend Lint"
dependencies: []
task:
jobs:
- name: "Lint"
commands:
- sleep 10
- echo "Lint completed"

- name: "Security checks"
- name: "Frontend Lint"
dependencies: []
task:
jobs:
- name: "Scan"
- name: "Lint"
commands:
- echo "Lint completed"

- name: "Backend Build"
dependencies: ["Backend Lint"]
task:
jobs:
- name: "Build"
commands:
- sleep 10
- echo "Scan completed"
- echo "Build completed"

- name: "Dockerize"
dependencies: ["Code quality checks"]
- name: "Frontend Build"
dependencies: ["Frontend Lint"]
task:
jobs:
- name: "Build"
commands:
- sleep 10
- echo "Build completed"

- name: "Unit tests"
dependencies: ["Dockerize"]
- name: "Backend Unit tests"
dependencies: ["Backend Build"]
task:
jobs:
- name: "Unit tests 1/3"
commands:
- sleep 10
- echo "Unit tests 1/3 completed"
- name: "Unit tests 2/3"
commands:
- sleep 10
- echo "Unit tests 2/3 completed"
- name: "Unit tests 3/3"
commands:
- sleep 10
- echo "Unit tests 3/3 completed"

- name: "Integration tests"
dependencies: ["Unit tests"]
- name: "Frontend Unit tests"
dependencies: ["Frontend Build"]
task:
jobs:
- name: "Integration tests 1/3"
- name: "Unit tests 1/2"
commands:
- sleep 10
- echo "Integration tests 1/3 completed"
- name: "Integration tests 2/3"
- echo "Unit tests 1/2 completed"
- name: "Unit tests 2/2"
commands:
- sleep 10
- echo "Integration tests 2/3 completed"
- echo "Unit tests 2/2 completed"

- name: "Long perf tests"
dependencies: ["Dockerize"]
- name: "E2E tests"
dependencies: ["Backend Unit tests", "Frontend Unit tests"]
task:
jobs:
- name: "Perf"
- name: "Nightwatch 🦉"
commands:
- sleep 60
- echo "Perf completed"
- echo "Nightwatch done"

- name: "Release candidate"
dependencies: ["Integration tests", "Long perf tests", "Security checks"]
dependencies: ["E2E tests"]
task:
jobs:
- name: "Release"
commands:
- sleep 10
- echo "Release completed"