From 7ff8361cda503d6ca2b192c686b3f3e15c5dbc20 Mon Sep 17 00:00:00 2001 From: lempire123 Date: Fri, 8 Mar 2024 10:33:58 +0100 Subject: [PATCH] fix: cleanup code --- .github/workflows/foundry-reports.yml | 42 ++++++++++++++------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/foundry-reports.yml b/.github/workflows/foundry-reports.yml index 2d9ae819..67ccaeb1 100644 --- a/.github/workflows/foundry-reports.yml +++ b/.github/workflows/foundry-reports.yml @@ -1,6 +1,6 @@ name: Foundry Reports -on: workflow_dispatch +on: [push] concurrency: group: ${{github.workflow}}-${{github.ref}} @@ -12,23 +12,24 @@ env: jobs: generate-gas-report: - name: Generate Foundry Gas Reports + name: Gas Reports runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: 'yarn' + uses: actions/checkout@v4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: nightly + - name: Install Node + uses: actions/setup-node@v4 + with: + registry-url: 'https://registry.npmjs.org' + node-version: 18.x + cache: 'yarn' + - name: Install dependencies run: yarn --frozen-lockfile --network-concurrency 1 @@ -39,30 +40,31 @@ jobs: run: grep '^|' gas-report.txt > temp && mv temp gas-report.txt - name: Upload Gas Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: gas-report path: gas-report.txt generate-coverage-report: - name: Generate Foundry Coverage Reports + name: Test Coverage runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.x - cache: 'yarn' + uses: actions/checkout@v4 - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: nightly + - name: Install Node + uses: actions/setup-node@v4 + with: + registry-url: 'https://registry.npmjs.org' + node-version: 18.x + cache: 'yarn' + - name: Install dependencies run: yarn --frozen-lockfile --network-concurrency 1 @@ -73,7 +75,7 @@ jobs: run: grep '^|' coverage-report.txt > temp && mv temp coverage-report.txt - name: Upload Test Coverage Table - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-coverage-report path: coverage-report.txt @@ -82,7 +84,7 @@ jobs: run: forge coverage --report lcov - name: Upload LCOV Test Coverage Report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: lcov-coverage-report path: lcov.info