Skip to content

Commit

Permalink
Merge pull request #14976 from strapi/chore/ci-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Nov 23, 2022
2 parents c5839f5 + 6658018 commit 988d1bd
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/check-pr-status

security-lockfile-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
- uses: ./.github/actions/security/lockfile
53 changes: 43 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}

- run: yarn install --frozen-lockfile
- name: Run lint
run: yarn run -s lint
Expand All @@ -45,7 +49,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}

- run: yarn install --frozen-lockfile
- name: Run tests
run: yarn run -s test:unit --coverage
Expand All @@ -68,7 +76,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}

- run: yarn install --frozen-lockfile
- name: Build
run: yarn build
Expand Down Expand Up @@ -112,7 +124,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
with:
Expand Down Expand Up @@ -147,7 +162,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
with:
Expand Down Expand Up @@ -182,7 +200,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
with:
Expand All @@ -201,7 +222,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
env:
Expand Down Expand Up @@ -243,7 +267,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
with:
Expand Down Expand Up @@ -281,7 +308,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
with:
Expand All @@ -304,7 +334,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- uses: ./.github/actions/run-api-tests
env:
Expand Down

0 comments on commit 988d1bd

Please sign in to comment.