Skip to content

Commit

Permalink
[CI] Improve cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Oct 4, 2024
1 parent 9869ad7 commit 7bda79b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ runs:
CONTAINERS: app
run: make up-no-deps

- name: Install composer dependencies
shell: bash
run: make vendor
# - name: Install composer dependencies
# shell: bash
# run: make vendor

- name: Create private & public key
if: inputs.keys == 'true'
Expand Down
42 changes: 30 additions & 12 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,17 @@ jobs:
keys: true
cache-warmup: true

- name: Cache static assets
uses: actions/cache@v4
with:
key: cache-${{ env.CACHE_KEY }}-static-${{ github.sha }}
path: |
public/built/
public/css/
public/select2/
- name: Prepare app (assets, cache, db, rabbitmq)
run: make tfp
run: make tfp-db

- env:
PHPUNIT_ARGS: --log-junit ./phpunit/junit.xml
Expand Down Expand Up @@ -214,8 +223,17 @@ jobs:
keys: true
cache-warmup: true

- name: Cache static assets
uses: actions/cache@v4
with:
key: cache-${{ env.CACHE_KEY }}-static-${{ github.sha }}
path: |
public/built/
public/css/
public/select2/
- name: Prepare app (assets, cache, db, rabbitmq)
run: make tfp
run: make tfp-db

- env:
BEHAT_ARGS: --suite=default -vvv --colors -f progress -o std -f junit -o ./behat --
Expand Down Expand Up @@ -252,8 +270,17 @@ jobs:
extra-containers: db redis rabbitmq selenium
keys: true

- name: Cache static assets
uses: actions/cache@v4
with:
key: cache-${{ env.CACHE_KEY }}-static-${{ github.sha }}
path: |
public/built/
public/css/
public/select2/
- name: Prepare app (assets, cache, db, rabbitmq)
run: make tfp
run: make tfp-db

- env:
BEHAT_ARGS: --suite=javascript --tags="${{ matrix.tags }}" -vvv --colors -f progress -o std -f junit -o ./behat --
Expand Down Expand Up @@ -288,15 +315,6 @@ jobs:
path: node_modules/
key: cache-${{ env.CACHE_KEY }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Cache static assets
uses: actions/cache@v4
with:
path: |
public/built/
public/css/
public/select2/
key: cache-${{ env.CACHE_KEY }}-static-${{ github.sha }}

- name: Setup yarn
uses: ./.github/actions/setup-yarn

Expand Down

0 comments on commit 7bda79b

Please sign in to comment.