-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CI pipeline to GitHub actions (#622)
* Add default pipeline * Refactor test-pipeline * Prevent tests from running twice * CI: increase timeout * CI: explicitly use local ganache * Danger deploy cmd: fixes Co-authored-by: Septen <[email protected]>
- Loading branch information
Showing
7 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- "*" | ||
name: Contracts (ETH) | ||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- job-name: nearbridge test | ||
cmd: | | ||
cd contracts/eth/nearbridge | ||
yarn | ||
yarn test | ||
timeout-minutes: 40 | ||
|
||
- job-name: nearprover test | ||
cmd: | | ||
cd contracts/eth/nearprover | ||
yarn | ||
yarn test | ||
timeout-minutes: 40 | ||
|
||
- job-name: verify near headers | ||
cmd: | | ||
yarn | ||
cd contracts/eth/ | ||
ci/test_verify_near_headers.sh | ||
timeout-minutes: 40 | ||
|
||
- job-name: verify near proofs | ||
cmd: | | ||
yarn | ||
cd contracts/eth/ | ||
ci/test_verify_near_proofs.sh | ||
timeout-minutes: 40 | ||
|
||
name: ${{ matrix.job-name }} | ||
steps: | ||
- name: Clone the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Execute | ||
run: ${{ matrix.cmd }} | ||
timeout-minutes: ${{ matrix.timeout-minutes }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- "*" | ||
name: Contracts (NEAR) | ||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- job-name: build all rust contracts | ||
cmd: | | ||
cd contracts/near/eth-client | ||
./build.sh | ||
cd ../eth-prover | ||
./build.sh | ||
git status | ||
changed_files=$(git status --porcelain --untracked-files=no | wc -l) | ||
if [ $changed_files -gt 0 ]; then | ||
echo 'contract changed, please rebuild contract' | ||
exit 1 | ||
fi | ||
timeout-minutes: 40 | ||
|
||
name: ${{ matrix.job-name }} | ||
steps: | ||
- name: Clone the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Execute | ||
run: ${{ matrix.cmd }} | ||
timeout-minutes: ${{ matrix.timeout-minutes }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- "*" | ||
name: Tests | ||
jobs: | ||
test: | ||
runs-on: self-hosted | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- job-name: Linter | ||
cmd: | | ||
yarn | ||
yarn standard | ||
yarn prettier-solidity | ||
timeout-minutes: 5 | ||
|
||
- job-name: E2E | ||
cmd: ./testing/ci/e2e.sh | ||
timeout-minutes: 60 | ||
|
||
- job-name: E2E myerc20 | ||
cmd: ./testing/ci/e2e_deploy_contract.sh | ||
timeout-minutes: 60 | ||
|
||
- job-name: Challenge with watchdog | ||
cmd: ./testing/ci/test_challenge.sh | ||
timeout-minutes: 60 | ||
|
||
- job-name: Test eth-relay catchup | ||
cmd: ./testing/ci/test_ethrelay_catchup.sh | ||
timeout-minutes: 60 | ||
|
||
name: ${{ matrix.job-name }} | ||
steps: | ||
- name: Clone the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install nearup | ||
run: | | ||
pip3 install nearup --upgrade --user | ||
echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH | ||
|
||
- name: Execute | ||
run: ${{ matrix.cmd }} | ||
timeout-minutes: ${{ matrix.timeout-minutes }} | ||
|
||
- name: Collect logs | ||
if: ${{ always() }} | ||
run: | | ||
mkdir logs_artifact | ||
if [[ -d ~/.rainbow/logs ]]; then | ||
cp -r ~/.rainbow/logs logs_artifact/rainbow-logs | ||
fi | ||
if [[ -f ~/.pm2/pm2.log ]]; then | ||
cp ~/.pm2/pm2.log logs_artifact/pm2.log | ||
fi | ||
|
||
- name: Upload logs | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.job-name }} (logs) | ||
path: logs_artifact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters