build(ci): run autofix in a unique job
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 24 Jun 2024 18:01:00 +0000 (20:01 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 24 Jun 2024 18:01:00 +0000 (20:01 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.github/workflows/autofix.yml

index 89dd1eb9427570914cd6bfef7a0223796128ad3b..5e6ba0efac7dae906be042ad24a4c731d20919d3 100644 (file)
@@ -7,11 +7,8 @@ permissions:
   contents: read
 
 jobs:
-  autofix-ocpp-server:
+  autofix:
     runs-on: ubuntu-latest
-    defaults:
-      run:
-        working-directory: tests/ocpp-server
     steps:
       - uses: actions/checkout@v4
       - run: pipx install poetry
@@ -19,37 +16,25 @@ jobs:
         with:
           python-version: 3.12
           cache: poetry
-      - run: poetry install --no-root
-      - run: poetry run task format
 
-      - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
-  autofix-simulator:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-      - uses: pnpm/action-setup@v4
-      - uses: actions/setup-node@v4
-        with:
-          cache: 'pnpm'
-
-      - run: pnpm install --ignore-scripts --frozen-lockfile
-      - run: pnpm format
+      - working-directory: tests/ocpp-server
+        run: |
+          poetry install --no-root
+          poetry run task lint
 
-      - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
-  autofix-dashboard:
-    runs-on: ubuntu-latest
-    defaults:
-      run:
-        working-directory: ui/web
-    steps:
       - uses: actions/checkout@v4
       - uses: pnpm/action-setup@v4
       - uses: actions/setup-node@v4
         with:
           cache: 'pnpm'
 
-      - run: pnpm install --ignore-scripts --frozen-lockfile
       - run: |
+          pnpm install --ignore-scripts --frozen-lockfile
+          pnpm format
+
+      - working-directory: ui/web
+        run: |
+          pnpm install --ignore-scripts --frozen-lockfile
           pnpm format
           pnpm lint:fix