|
10 | 10 | workflow_dispatch:
|
11 | 11 |
|
12 | 12 | jobs:
|
| 13 | + code-formatting: |
| 14 | + runs-on: ubuntu-22.04 |
| 15 | + name: Code Formatting |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + fetch-depth: 0 |
| 20 | + - name: Fetch base ref |
| 21 | + if: ${{ github.event.pull_request }} |
| 22 | + run: git fetch origin ${{ github.base_ref }} |
| 23 | + - run: npm install |
| 24 | + - name: Install CPAN deps |
| 25 | + uses: perl-actions/install-with-cpm@v1 |
| 26 | + with: |
| 27 | + cpanfile: 'cpanfile' |
| 28 | + sudo: false |
| 29 | + args: > |
| 30 | + - |
| 31 | + --resolver=snapshot |
| 32 | + --show-build-log-on-failure |
| 33 | + --local-lib-contained=local |
| 34 | + --without-runtime |
| 35 | + --without-test |
| 36 | + --without-build |
| 37 | + --with-develop |
| 38 | + - name: Install precious |
| 39 | + run: ./bin/install-precious /usr/local/bin |
| 40 | + - name: Lint modified files |
| 41 | + if: ${{ github.event.pull_request }} |
| 42 | + run: precious lint --git-diff-from ${{ github.base_ref }} |
| 43 | + - name: Lint all files |
| 44 | + if: ${{ ! github.event.pull_request }} |
| 45 | + run: precious lint --all |
13 | 46 | docker:
|
14 | 47 | runs-on: ubuntu-22.04
|
15 | 48 | name: Docker
|
@@ -93,17 +126,3 @@ jobs:
|
93 | 126 | fail_ci_if_error: true
|
94 | 127 | file: ./cover_db/codecov.json
|
95 | 128 | token: ${{ secrets.CODECOV_TOKEN }}
|
96 |
| - - name: Install precious |
97 |
| - run: ./bin/install-precious /usr/local/bin |
98 |
| - - name: Install perlimports |
99 |
| - run: cpm install -g App::perlimports |
100 |
| - if: matrix.resolver == 'snapshot' |
101 |
| - - name: Fetch master |
102 |
| - run: git fetch origin master:master |
103 |
| - if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot' |
104 |
| - - name: Lint files in diff (branch) |
105 |
| - run: precious lint -d master |
106 |
| - if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot' |
107 |
| - - name: Lint all files (master) |
108 |
| - run: precious lint --all |
109 |
| - if: github.ref == 'refs/heads/master' && matrix.resolver == 'snapshot' |
|
0 commit comments