refactor: metrics_rotuer final pass (MORE TESTS REQUIRED) #766
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Yaml Formatter | |
| on: push | |
| jobs: | |
| format-yaml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| # Step 2: Set up Node.js environment | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" # Specify your Node.js version | |
| # Step 3: Install Prettier and ESLint globally | |
| - name: Install Prettier | |
| run: | | |
| npm install -g prettier | |
| # Step 4: Run Prettier to format code | |
| - name: Run prettier | |
| run: | | |
| prettier "**/*.yml" --write | |
| git diff | |
| git reset --hard | |
| prettier --check "**/*.yml" | |
| # Step 5: Report status | |
| - name: Complete | |
| run: echo "Formatting completed successfully!" |