-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
34 lines (32 loc) · 1.05 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
stages:
- test
test-mr-job:
script: echo "Running tests for merge request"
stage: test
image: ghcr.io/foundry-rs/foundry
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
before_script:
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "[email protected]:"
script:
- echo "Install build essentials"
- apk add --no-cache openssh
- echo "Build with commit $CI_COMMIT_BRANCH!"
- forge install
- forge test --no-match-contract "(O|o)nchain"
test-schedule-job:
script: echo "Running tests for scheduled pipeline"
stage: test
image: ghcr.io/foundry-rs/foundry
rules:
- if: $CI_PIPELINE_SOURCE == 'schedule'
before_script:
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "[email protected]:"
script:
- echo "Install build essentials"
- apk add --no-cache openssh
- echo "Build with commit $CI_COMMIT_BRANCH!"
- forge install
- cp .env.example .env
- source .env
- forge test --match-contract "(O|o)nchain"