diff --git a/.github/workflows/forge-build.yml b/.github/workflows/forge-build.yml index b50b10e..ef2fae1 100644 --- a/.github/workflows/forge-build.yml +++ b/.github/workflows/forge-build.yml @@ -49,7 +49,7 @@ jobs: - name: "Cache the contracts and the node modules so that they can be re-used by the other jobs" if: ${{ inputs.save-cache }} - uses: "actions/cache/save@v3" + uses: "actions/cache/save@v4" with: key: "build-and-modules-${{ github.sha }}" path: ${{ inputs.cache-path }} @@ -60,7 +60,7 @@ jobs: - name: "Store the contract artifacts in CI" if: ${{ inputs.store-artifacts }} - uses: "actions/upload-artifact@v3" + uses: "actions/upload-artifact@v4" with: name: "contract-artifacts" path: "artifacts" diff --git a/.github/workflows/forge-coverage.yml b/.github/workflows/forge-coverage.yml index 8cc9644..e33cfec 100644 --- a/.github/workflows/forge-coverage.yml +++ b/.github/workflows/forge-coverage.yml @@ -33,7 +33,7 @@ jobs: - name: "Restore the cached build and the node modules" if: ${{ inputs.restore-cache }} - uses: "actions/cache/restore@v3" + uses: "actions/cache/restore@v4" with: fail-on-cache-miss: true key: "build-and-modules-${{ github.sha }}" @@ -43,7 +43,7 @@ jobs: run: 'forge coverage --match-path "${{ inputs.match-path }}" --report lcov' - name: "Upload coverage report to Codecov" - uses: "codecov/codecov-action@v3" + uses: "codecov/codecov-action@v4" with: files: "./lcov.info" diff --git a/.github/workflows/forge-test.yml b/.github/workflows/forge-test.yml index 6b9125d..df7c884 100644 --- a/.github/workflows/forge-test.yml +++ b/.github/workflows/forge-test.yml @@ -73,7 +73,7 @@ jobs: - name: "Restore the cached build and the node modules" if: ${{ inputs.restore-cache }} - uses: "actions/cache/restore@v3" + uses: "actions/cache/restore@v4" with: fail-on-cache-miss: true key: "build-and-modules-${{ github.sha }}" diff --git a/.github/workflows/rust-ci b/.github/workflows/rust-ci new file mode 100644 index 0000000..ae3e027 --- /dev/null +++ b/.github/workflows/rust-ci @@ -0,0 +1,32 @@ +name: "CI" + +on: "workflow_call" + +jobs: + check: + name: "Check" + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "dtolnay/rust-toolchain@stable" + - run: "cargo check" + + fmt: + name: "Rustfmt" + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "dtolnay/rust-toolchain@nightly" + with: + components: "rustfmt" + - run: "cargo +nightly fmt --all -- --check" + + clippy: + name: "Clippy" + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v4" + - uses: "dtolnay/rust-toolchain@nightly" + with: + components: "clippy" + - run: "cargo clippy -- -D warnings" \ No newline at end of file