From ff0e4dee1f8785e581cd8fc92859964e7d9b1e3d Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 12 Oct 2023 12:52:48 +0200 Subject: [PATCH] ci: add formatter --- .github/workflows/formatting.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 7 ------- 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/formatting.yml 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: