-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
58 lines (50 loc) · 2.27 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# stages: # List of stages for jobs, and their order of execution
# - build
# - test
# - deploy
# image: rust:latest # Uses the latest Rust Docker image as the base
# before_script:
# - curl -fsSL https://deb.nodesource.com/setup_22.x | bash - # Installs Node.js version 22
# - apt-get install -y nodejs
# - npm install -g yarn # Installs Yarn globally using npm
# - git config --global user.email "[email protected]" # Set the specified email
# - git config --global user.name "GitLab Guardian Angel" # Set the specified user name
# build-job: # This job runs in the build stage, which runs first.
# stage: build
# script:
# - echo "Building the contract..."
# - yarn build-contract
# - echo "Compile complete."
# - git add .
# - git diff-index --quiet HEAD || git commit -m "Auto-commit by GitLab CI" # Only commit if there are changes
# - git push origin HEAD:main || echo "No changes to push." # Push changes or skip if no changes
# only:
# - main # Specifies that this job should only run on the main branch
# unit-test-job: # This job runs in the test stage.
# stage: test # It only starts when the job in the build stage completes successfully.
# script:
# - echo "Running unit tests... This will take about 10 seconds."
# - sleep 10
# - echo "Code coverage is 90% :D"
# lint-test-job: # This job also runs in the test stage.
# stage: test # It can run at the same time as unit-test-job (in parallel).
# script:
# - echo "Linting code... This will take about 10 seconds."
# - sleep 10
# - echo "No lint issues found. :D"
# deploy-job: # This job runs in the deploy stage.
# stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
# environment: production
# script:
# - echo "Deploying application..."
# - echo "Application successfully deployed."
# TODO: Remove this when CI is used again. This is just here to avoid triggering failed pipeline emails.
stages:
- default
# An empty job to ensure the pipeline does not fail
dummy-job:
stage: default
script:
- echo "This is a dummy job to ensure the pipeline does not fail"
only:
- schedules # Restrict this job to run only if triggered by a schedule (it won't run in normal pipelines)