Skip to content

Commit

Permalink
port changes to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann committed Sep 24, 2024
1 parent 1852871 commit 327ac05
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 327ac05

Please sign in to comment.