diff --git a/.github/workflows/hardhat.js.yml b/.github/workflows/hardhat.js.yml deleted file mode 100644 index dec97bd..0000000 --- a/.github/workflows/hardhat.js.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Smart contracts - -on: - pull_request: - branches: - - "**" - -defaults: - run: - working-directory: contracts/ - -jobs: - test: - name: ✅ Test - runs-on: ubuntu-latest - env: - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - POLYGON_ALCHEMY_KEY: ${{ secrets.POLYGON_ALCHEMY_KEY }} - ETH_ALCHEMY_KEY: ${{ secrets.ETH_ALCHEMY_KEY }} - steps: - - name: 🛑 Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - - - name: ⬇️ Checkout repo - uses: actions/checkout@v3 - - - name: ⎔ Setup node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: 🐢 Cache node modules - id: cache-npm - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} - name: 📚 List the state of node modules - continue-on-error: true - run: npm list - - - name: 📥 Download deps - run: npm install - - - name: 🤔 Run smart contract tests - run: MINING=true CI=true npx hardhat test - - - name: 🏗️ Save build - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "fix: gas report" - audit: - name: 👁️ Audit - runs-on: ubuntu-latest - steps: - - name: 🛑 Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 - - - name: ⬇️ Checkout repo - uses: actions/checkout@v3 - - - name: 📥 Download deps - run: cd build && git clone https://github.com/byterocket/c4udit && cd c4udit && go build . - - - name: 😡 Run contract auditor - run: cd build && ./c4udit/c4udit -s ../contracts/ - - - name: 🏗️ Save build - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "fix: contract audit"