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 gitlab ci #1778

Closed
wants to merge 1 commit into from
Closed
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
87 changes: 87 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
image: node:18

stages:
- build
- build-testable
- test

before_script:
- export CANNON_DIRECTORY="$(pwd)/.cannon"

# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
paths:
- .cannon

build:
stage: build
script: yarn install --immutable --immutable-cache && yarn build

build-testable:
stage: build-testable
script: yarn workspaces foreach --topological-dev --recursive --verbose run build-testable

.test:
stage: test
script: yarn hardhat test
only:
refs:
- merge_requests

test-core-contracts:
extends: .test
before_script:
- cd utils/core-contracts
only:
changes:
- utils/core-contracts/*

test-core-modules:
extends: .test
before_script:
- cd utils/core-modules
only:
changes:
- utils/core-contracts/*
- utils/core-modules/*

test-oracle-manager:
extends: .test
before_script:
- cd protocol/oracle-manager
only:
changes:
- utils/core-contracts/*
- utils/core-modules/*
- protocol/oracle-manager/*

test-synthetix:
extends: .test
before_script:
- cd protocol/synthetix
only:
changes:
- utils/core-contracts/*
- utils/core-modules/*
- protocol/synthetix/*

test-spot-market:
extends: .test
before_script:
- cd markets/spot-market
only:
changes:
- utils/core-contracts/*
- utils/core-modules/*
- markets/spot-market/*

test-perps-market:
extends: .test
before_script:
- cd markets/perps-market
only:
changes:
- utils/core-contracts/*
- utils/core-modules/*
- markets/perps-market/*
Loading