|
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 }}:upstream |
| 23 | + - run: npm install |
| 24 | + - name: Install Carton |
| 25 | + uses: perl-actions/install-with-cpm@v1 |
| 26 | + with: |
| 27 | + install: Carton |
| 28 | + - name: Install CPAN deps |
| 29 | + uses: perl-actions/install-with-cpm@v1 |
| 30 | + with: |
| 31 | + cpanfile: 'cpanfile' |
| 32 | + args: > |
| 33 | + --resolver=snapshot |
| 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 upstream |
| 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
|
|
40 | 73 | DEVEL_COVER_OPTIONS: '-ignore,^local/'
|
41 | 74 | steps:
|
42 | 75 | - uses: actions/checkout@v4
|
43 |
| - with: |
44 |
| - fetch-depth: 0 |
45 | 76 | if: matrix.resolver == 'snapshot'
|
46 | 77 | - uses: actions/checkout@v4
|
47 | 78 | if: matrix.resolver != 'snapshot'
|
@@ -91,17 +122,3 @@ jobs:
|
91 | 122 | fail_ci_if_error: true
|
92 | 123 | file: ./cover_db/codecov.json
|
93 | 124 | token: ${{ secrets.CODECOV_TOKEN }}
|
94 |
| - - name: Install precious |
95 |
| - run: ./bin/install-precious /usr/local/bin |
96 |
| - - name: Install perlimports |
97 |
| - run: cpm install -g App::perlimports |
98 |
| - if: matrix.resolver == 'snapshot' |
99 |
| - - name: Fetch master |
100 |
| - run: git fetch origin master:master |
101 |
| - if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot' |
102 |
| - - name: Lint files in diff (branch) |
103 |
| - run: precious lint -d master |
104 |
| - if: github.ref != 'refs/heads/master' && matrix.resolver == 'snapshot' |
105 |
| - - name: Lint all files (master) |
106 |
| - run: precious lint --all |
107 |
| - if: github.ref == 'refs/heads/master' && matrix.resolver == 'snapshot' |
|
0 commit comments