From af0197205adb3220673022b690f1d8aa6f6734aa Mon Sep 17 00:00:00 2001 From: Valentin Khramtsov Date: Thu, 27 Mar 2025 16:10:14 +0300 Subject: [PATCH] fix: test run outside a PR --- .github/workflows/ci-test.yaml | 19 +++++++++++++++++++ .github/workflows/evm-foundry-ci.yml | 4 ++-- .github/workflows/slither.yml | 6 +++--- .../workflows/tests-and-lints-template.yaml | 2 +- 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci-test.yaml diff --git a/.github/workflows/ci-test.yaml b/.github/workflows/ci-test.yaml new file mode 100644 index 0000000..8c45407 --- /dev/null +++ b/.github/workflows/ci-test.yaml @@ -0,0 +1,19 @@ +name: Continuous Integration + +on: + push: + branches: + - fix/git-checkout-stage-fix + +permissions: + id-token: write + contents: read + +jobs: + tests-and-lints: + uses: ./.github/workflows/tests-and-lints-template.yaml + secrets: + eth_rpc_url: ${{ secrets.ETH_RPC_URL }} + app_id: ${{ secrets.APP_ID }} + app_private_key: ${{ secrets.APP_PRIVATE_KEY }} + diff --git a/.github/workflows/evm-foundry-ci.yml b/.github/workflows/evm-foundry-ci.yml index ee56fa0..be7c9b8 100644 --- a/.github/workflows/evm-foundry-ci.yml +++ b/.github/workflows/evm-foundry-ci.yml @@ -13,12 +13,12 @@ jobs: env: RPC_URL: ${{ secrets.ETH_RPC_URL }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: submodules: recursive - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 + uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c - name: Check formatting run: forge fmt --check diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml index 4134b29..dc18ce8 100644 --- a/.github/workflows/slither.yml +++ b/.github/workflows/slither.yml @@ -10,8 +10,8 @@ jobs: analyze: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: crytic/slither-action@v0.4.0 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: crytic/slither-action@f197989dea5b53e986d0f88c60a034ddd77ec9a8 with: target: 'foundry/' - slither-args: '--filter-paths foundry/lib/' \ No newline at end of file + slither-args: '--filter-paths foundry/lib/' diff --git a/.github/workflows/tests-and-lints-template.yaml b/.github/workflows/tests-and-lints-template.yaml index 4cd9a14..947695d 100644 --- a/.github/workflows/tests-and-lints-template.yaml +++ b/.github/workflows/tests-and-lints-template.yaml @@ -92,7 +92,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: - ref: refs/pull/${{ github.event.pull_request.number }}/head + ref: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/head', github.event.pull_request.number) || github.ref }} - name: Setup git to use https run: |