Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
neila committed May 9, 2023
1 parent dfc0f89 commit 954afbb
Showing 1 changed file with 16 additions and 29 deletions.
45 changes: 16 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [pull_request]
on: [push]

jobs:
setup-node:
Expand All @@ -20,34 +20,14 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

setup-pyenv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup venv
run: |
python -m venv venv
source venv/bin/activate
- uses: actions/cache@v3
id: pip-cache
with:
path: 'venv'
key: ${{ runner.os }}-${{ hashFiles('**/requirements.txt') }}
- name: Install packages
if: steps.pip-cache.outputs.cache-hit != 'true'
run: python -m pip install -r requirements.txt

contract-test:
runs-on: ubuntu-latest
needs: setup-node
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: '**/node_modules'
path: 'node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: format check
run: yarn prettier:check
Expand All @@ -56,19 +36,26 @@ jobs:

slither-scan:
runs-on: ubuntu-latest
needs: [setup-node, setup-pyenv]
needs: setup-node
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- uses: actions/cache@v3
id: pip-cache
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
path: 'venv'
key: ${{ runner.os }}-${{ hashFiles('**/requirements.txt') }}
- name: activate pyenv
run: source venv/bin/activate
python-version: '3.8'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Install dependencies
run: |
pip install -r requirements.txt
solc-select use 0.4.25 --always-install
solc-select use 0.8.0 --always-install
solc-select use 0.5.1 --always-install
pip install typing_extensions==4.1.1
pip install importlib_metadata==4.8.3
- name: Slither scan
run: yarn psummary

0 comments on commit 954afbb

Please sign in to comment.