|
19 | 19 | - '.github/workflows/deptrac.yml' |
20 | 20 |
|
21 | 21 | jobs: |
22 | | - build: |
23 | | - name: Dependency Tracing |
24 | | - runs-on: ubuntu-latest |
25 | | - if: "!contains(github.event.head_commit.message, '[ci skip]')" |
26 | | - |
27 | | - steps: |
28 | | - - name: Checkout |
29 | | - uses: actions/checkout@v4 |
30 | | - |
31 | | - - name: Set up PHP |
32 | | - uses: shivammathur/setup-php@v2 |
33 | | - with: |
34 | | - php-version: '8.1' |
35 | | - tools: phive |
36 | | - extensions: intl, json, mbstring, xml |
37 | | - coverage: none |
38 | | - env: |
39 | | - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
40 | | - |
41 | | - - name: Get composer cache directory |
42 | | - run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV |
43 | | - |
44 | | - - name: Cache composer dependencies |
45 | | - uses: actions/cache@v3 |
46 | | - with: |
47 | | - path: ${{ env.COMPOSER_CACHE_FILES_DIR }} |
48 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} |
49 | | - restore-keys: ${{ runner.os }}-composer- |
50 | | - |
51 | | - - name: Create Deptrac cache directory |
52 | | - run: mkdir -p build/ |
53 | | - |
54 | | - - name: Cache Deptrac results |
55 | | - uses: actions/cache@v3 |
56 | | - with: |
57 | | - path: build |
58 | | - key: ${{ runner.os }}-deptrac-${{ github.sha }} |
59 | | - restore-keys: ${{ runner.os }}-deptrac- |
60 | | - |
61 | | - - name: Install dependencies |
62 | | - run: | |
63 | | - if [ -f composer.lock ]; then |
64 | | - composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader |
65 | | - else |
66 | | - composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader |
67 | | - fi |
68 | | -
|
69 | | - - name: Trace dependencies |
70 | | - run: | |
71 | | - sudo phive --no-progress install --global --trust-gpg-keys B8F640134AB1782E,A98E898BB53EB748 qossmic/deptrac |
72 | | - deptrac analyze --cache-file=build/deptrac.cache |
| 22 | + deptrac: |
| 23 | + uses: codeigniter4/.github/.github/workflows/deptrac.yml@main |
0 commit comments