diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml new file mode 100644 index 0000000..05b0d89 --- /dev/null +++ b/.github/workflows/formatting.yml @@ -0,0 +1,32 @@ +name: test + +on: push + +env: + FOUNDRY_PROFILE: ci + +jobs: + check: + name: Foundry project + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate-token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ steps.generate-token.outputs.token }} + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Run Forge linter + run: forge fmt --check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52dd99b..c5134eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,13 +10,6 @@ jobs: name: Foundry project runs-on: ubuntu-latest steps: - - name: Generate a token - id: generate-token - uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - - name: Checkout uses: actions/checkout@v3 with: