From 327ac051ed2c7a8a6304584ba81df535cb029f40 Mon Sep 17 00:00:00 2001 From: MalteHerrmann Date: Tue, 24 Sep 2024 10:16:02 +0200 Subject: [PATCH] port changes to CI --- .github/workflows/auto-format.yml | 43 +++++++++++++++--------------- .github/workflows/super-linter.yml | 1 + 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml index b587fa4a..7d0e59a8 100644 --- a/.github/workflows/auto-format.yml +++ b/.github/workflows/auto-format.yml @@ -6,43 +6,42 @@ on: permissions: read-all jobs: - format-go-code: + format-code: runs-on: ubuntu-latest permissions: contents: write steps: - - uses: actions/setup-go@v5 - with: - go-version: "1.22" - check-latest: true + # Checkout repository - uses: actions/checkout@v4 with: token: ${{ secrets.E2E_PAT }} - - run: go install mvdan.cc/gofumpt@latest - - run: make format - # Commit formatted files if necessary - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: run make format - format-python-code: - runs-on: ubuntu-latest - - permissions: - contents: write + # Install shell formatter + - run: sudo apt-get install -y shfmt - steps: - - uses: actions/checkout@v4 + # Set up Go + - uses: actions/setup-go@v5 with: - token: ${{ secrets.E2E_PAT }} + go-version: "1.22" + check-latest: true + + # Install Go formatter + - run: go install mvdan.cc/gofumpt@latest + + # Set up Python - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" + + # Install Python formatters - run: pip install black isort - - run: make format-python + + # Run the combined format command + - run: make format + # Commit formatted files if necessary - uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: run make format-python + commit_message: run make format diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 5c2429e7..24d6f1e4 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -32,6 +32,7 @@ jobs: VALIDATE_OPENAPI: false VALIDATE_JSCPD: false VALIDATE_GO: false + VALIDATE_GO_MODULES: false PYTHON_PYLINT_CONFIG_FILE: .pylintrc DEFAULT_BRANCH: "main" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}