Beta Release for Strapi 5 Migration #101
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| - 'dev/**' | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| linters: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # cache node_modules | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| id: yarn-cache | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| # install dependencies if the cache did not hit | |
| - name: Install dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| run: yarn --frozen-lockfile | |
| - run: yarn test:lint | |
| e2e_memory: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # cache node_modules | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| id: yarn-cache | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| # install dependencies if the cache did not hit | |
| - name: Install dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| run: yarn --frozen-lockfile | |
| - run: yarn postinstall:memory | |
| - run: yarn build:plugin:rest-cache | |
| - name: Run Memory e2e tests | |
| working-directory: playgrounds/memory | |
| run: yarn test:e2e | |
| e2e_redis: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [20, 22] | |
| services: | |
| redis: | |
| image: bitnami/redis:latest | |
| env: | |
| ALLOW_EMPTY_PASSWORD: yes | |
| ports: | |
| # Opens tcp port 6379 on the host and service container | |
| - 6379:6379 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # cache node_modules | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| id: yarn-cache | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| # install dependencies if the cache did not hit | |
| - name: Install dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| run: yarn --frozen-lockfile | |
| - run: yarn postinstall:redis | |
| - run: yarn build:plugin:rest-cache | |
| - name: Run Redis e2e tests | |
| working-directory: playgrounds/redis | |
| run: yarn test:e2e |