diff --git a/.github/workflows/base_tests.yml b/.github/workflows/base_tests.yml index 0721389701..c3cea2d7a3 100644 --- a/.github/workflows/base_tests.yml +++ b/.github/workflows/base_tests.yml @@ -107,24 +107,24 @@ jobs: NIMFLAGS="${NIMFLAGS} --mm:${{ matrix.nim_branch.memory_management }}" nimble test - lint: - name: "Lint" - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base + # lint: + # name: "Lint" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base - - name: Check nph formatting - # Pin nph to a specific version to avoid sudden style differences. - # Updating nph version should be accompanied with running the new - # version on the fluffy directory. - run: | - VERSION="v0.5.1" - ARCHIVE="nph-linux_x64.tar.gz" - curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} - tar -xzf ${ARCHIVE} - shopt -s extglob # Enable extended globbing - ./nph examples libp2p tests tools *.@(nim|nims|nimble) - git diff --exit-code + # - name: Check nph formatting + # # Pin nph to a specific version to avoid sudden style differences. + # # Updating nph version should be accompanied with running the new + # # version on the fluffy directory. + # run: | + # VERSION="v0.5.1" + # ARCHIVE="nph-linux_x64.tar.gz" + # curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} + # tar -xzf ${ARCHIVE} + # shopt -s extglob # Enable extended globbing + # ./nph examples libp2p tests tools *.@(nim|nims|nimble) + # git diff --exit-code diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml new file mode 100644 index 0000000000..c2ff4f9613 --- /dev/null +++ b/.github/workflows/formatter.yml @@ -0,0 +1,34 @@ +name: Code Formatter + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + formatter: + name: "Format Codebase" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base + + - name: Format with NPH + # Pin nph to a specific version to avoid sudden style differences. + # Updating nph version should be accompanied with running the new + # version on the fluffy directory. + run: | + VERSION="v0.5.1" + ARCHIVE="nph-linux_x64.tar.gz" + curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} + tar -xzf ${ARCHIVE} + shopt -s extglob # Enable extended globbing + ./nph examples libp2p tests tools *.@(nim|nims|nimble) + git diff --exit-code