-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (39 loc) · 1.36 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Clear
run: docker image prune -f && docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm
- name: Build docker
run: docker build -t isolated:${GITHUB_SHA::7} .
- name: Run hardhat tests
run: docker run --name ${GITHUB_SHA::7} isolated:${GITHUB_SHA::7} bash -c "yarn hardhat:test"
- name: Clear
run: docker rm ${GITHUB_SHA::7}
- name: Run compound tests
run: docker run --name ${GITHUB_SHA::7} isolated:${GITHUB_SHA::7} bash -c "yarn test"
- name: Clear
run: docker rm ${GITHUB_SHA::7}
# - name: Install solc
# run: wget https://github.com/ethereum/solidity/releases/download/v0.8.13/solc-static-linux && sudo mv solc-static-linux /usr/bin/solc && sudo chmod +x /usr/bin/solc
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v2
# with:
# node-version: "12.x"
# - name: Install yarn
# run: npm install --global yarn
# - name: Install dependencies
# run: yarn install
# - name: Run hardhat test
# run: yarn hardhat:test
# - name: Run compound test
# run: yarn test