Skip to content

Commit

Permalink
Try to use github variable to control the formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
timfelle committed Mar 11, 2024
1 parent 1013c96 commit 6c3777f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pip3 install findent
- name: Format sources
env:
FINDENT_FLAGS: "-Rr -i2 -d3 -f3 -s3 -w3 -t3 -j3 -kd --ws_remred --align_paren --indent_ampersand"
FINDENT_FLAGS: ${{ vars.FINDENT_FLAGS }}
run: |
find sources/ -name "*.f90" -exec bash -c "findent < \"{}\" > \"{}\".tmp && mv -f \"{}\".tmp \"{}\"" \;
- name: Check format
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/pr_main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# cat .github/workflows/deploy.yml
name: Check Development PRs
on:
# Todo: Remove the push events before merging to develop
push:
branches: [cicd/develop]
# Todo: Add the deployment steps here when ready. Please check the pr_develop when doing so.

pull_request:
branches: [main]

jobs:
# Pull in the external workflows so we avoid duplication
check_documentation:
uses: ./.github/workflows/check_documentation.yml
check_formatting:
uses: ./.github/workflows/check_formatting.yml
check_compilation:
uses: ./.github/workflows/check_compilation.yml

# Dummy job to trigger the other jobs
check-develop:
name: Run all checks for development PRs
needs:
- check_documentation
- check_formatting
- check_compilation
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "All checks passed"
# name: Check Development PRs
# on:
# pull_request:
# branches: [main]

# jobs:
# # Pull in the external workflows so we avoid duplication
# check_documentation:
# uses: ./.github/workflows/check_documentation.yml
# check_formatting:
# uses: ./.github/workflows/check_formatting.yml
# check_compilation:
# uses: ./.github/workflows/check_compilation.yml

# # Dummy job to trigger the other jobs
# check-develop:
# name: Run all checks for development PRs
# needs:
# - check_documentation
# - check_formatting
# - check_compilation
# runs-on: ubuntu-latest
# steps:
# - name: Success
# run: echo "All checks passed"

0 comments on commit 6c3777f

Please sign in to comment.